#include <bits/stdc++.h>
using namespace std;
const int N = 3e5;
int n, q;
vector<int> g[N];
int deg[N];
int dep[N];
int len[N];
int p[N];
char c[N];
int dn[N];
int up[N];
int dp[N][26];
int cn[N][26];
vector<int> small;
int badcnt = 0;
int update(int v, char newc) {
  char oldc = c[v];
  c[v] = newc;
  v = dn[v];
  if (oldc != '?') {
    --cn[v][oldc - 'a'];
  }
  if (newc != '?') {
    ++cn[v][newc - 'a'];
  }
  v = up[v];
  while (v != 0) {
    int sum;
    sum = accumulate(dp[v], dp[v] + 26, 0);
    if (sum > len[v]) {
      --badcnt;
    }
    fill_n(dp[v], 26, 0);
    for (int u : g[v]) {
      for (int i = 0; i < 26; ++i) {
        dp[v][i] = max(dp[v][i], dp[u][i] + cn[u][i]);
      }
    }
    sum = accumulate(dp[v], dp[v] + 26, 0);
    if (sum > len[v]) {
      ++badcnt;
    }
    v = up[v];
  }
  fill_n(dp[0], 26, 0);
  for (int u : g[0]) {
    for (int i = 0; i < 26; ++i) {
      dp[0][i] = max(dp[0][i], dp[u][i] + cn[u][i]);
    }
  }
  if (badcnt > 0) {
    return -1;
  }
  int sum = accumulate(dp[0], dp[0] + 26, 0);
  int add = len[0] - sum;
  if (add < 0) {
    return -1;
  }
  int res = 0;
  for (int i = 0; i < 26; ++i) {
    int mx = dp[0][i] + add;
    res += (i + 1) * mx;
  }
  return res;
}
void no() {
  for (int i = 0; i < q; ++i) {
    cout << "Fou\n";
  }
  exit(0);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> q;
  c[0] = '?';
  p[0] = -1;
  for (int i = 1; i < n; ++i) {
    cin >> p[i] >> c[i];
    --p[i];
    ++deg[p[i]];
    dep[i] = dep[p[i]] + 1;
  }
  for (int i = n - 1; i > 0; --i) {
    int pr = p[i];
    len[pr] = len[i] + 1;
    if (deg[i] != 1) {
      dn[i] = i;
    }
    if (deg[pr] == 1) {
      dn[pr] = dn[i];
    }
  }
  for (int i = 0; i < n; ++i) {
    if (!deg[i] && dep[i] != len[0]) {
      no();
    }
  }
  up[0] = 0;
  for (int i = 1; i < n; ++i) {
    int pr = p[i];
    if (deg[pr] == 1) {
      up[i] = up[pr];
      copy_n(cn[pr], 26, cn[i]);
    } else {
      up[i] = pr;
    }
    if (c[i] != '?') {
      ++cn[i][c[i] - 'a'];
    }
  }
  for (int v = n - 1; v > 0; --v) {
    if (deg[v] == 1) {
      continue;
    }
    g[up[v]].push_back(v);
    int sum = accumulate(dp[v], dp[v] + 26, 0);
    if (sum > len[v]) {
      ++badcnt;
    }
    int pr = up[v];
    for (int i = 0; i < 26; ++i) {
      dp[pr][i] = max(dp[pr][i], dp[v][i] + cn[v][i]);
    }
  }
  while (q--) {
    int v;
    char newc;
    cin >> v >> newc;
    int res = update(v - 1, newc);
    if (res == -1) {
      cout << "Fou\n";
    } else {
      cout << "Shi " << res << "\n";
    }
  }
  return 0;
}
