#include <bits/stdc++.h>
using namespace std;
const int maxn = 150005;
vector<int> ve[maxn], so[maxn];
int n, q;
char ss[10];
char ch[maxn];
int len[maxn], dylf[maxn], fa[maxn];
int dfs(int x) {
  int son = 0;
  for (auto y : ve[x]) {
    dylf[x] = dfs(y);
    if (len[x] && len[y] + 1 != len[x]) {
      for (int i = 1; i <= q; i++) puts("Fou");
      exit(0);
    } else
      len[x] = len[y] + 1;
    son++;
  }
  if (!son)
    dylf[x] = x;
  else if ((x == 0) || son > 1) {
    dylf[x] = x;
    for (auto y : ve[x]) fa[dylf[y]] = x, so[x].push_back(dylf[y]);
  }
  return dylf[x];
}
int BAN;
int dp[maxn][26];
int cc[maxn][26], sum[maxn];
void upd(int x, int y, int z) {
  cc[x][y] += z;
  for (int o = fa[x]; o != -1; o = fa[o]) {
    BAN -= (sum[o] > len[o]);
    sum[o] -= dp[o][y];
    dp[o][y] = 0;
    for (auto e : so[o]) {
      dp[o][y] = max(dp[o][y], cc[e][y] + dp[e][y]);
    }
    sum[o] += dp[o][y];
    BAN += (sum[o] > len[o]);
  }
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 2; i <= n; i++) {
    int x;
    scanf("%d", &x);
    ve[x].push_back(i);
    scanf("%s", &ss[1]);
    ch[i] = ss[1];
  }
  fa[0] = -1;
  ve[0].push_back(1);
  dfs(0);
  len[0]--;
  for (int i = 2; i <= n; i++) {
    if (ch[i] != '?') upd(dylf[i], ch[i] - 'a', +1);
  }
  for (int qi = 1; qi <= q; qi++) {
    int x;
    scanf("%d%s", &x, &ss[1]);
    if (ch[x] != '?') upd(dylf[x], ch[x] - 'a', -1);
    ch[x] = ss[1];
    if (ch[x] != '?') upd(dylf[x], ch[x] - 'a', +1);
    if (BAN != 0)
      puts("Fou");
    else {
      long long ans = 0;
      for (int i = 0; i < 26; i++) {
        ans += 1ll * (i + 1) * (len[0] - sum[0] + dp[0][i]);
      }
      printf("Shi %lld\n", ans);
    }
  }
}
