#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
const int maxn = 1.5e5 + 10;
int n, q, fa[maxn], top[maxn], f[maxn][26], dep[maxn], sum[maxn], cnt = 0,
                                                                  down[maxn];
int mxdep, w[maxn], up[maxn][26], mndep = 0x3f3f3f3f;
vector<pair<int, int> > linker[maxn];
bool mark[maxn];
vector<int> son[maxn];
inline void addedge(int u, int v, int w) {
  linker[u].push_back(pair<int, int>(v, w));
}
void dfs(int x) {
  dep[x] = dep[fa[x]] + 1, mxdep = max(mxdep, dep[x]);
  if (linker[fa[x]].size() == 1)
    top[x] = top[fa[x]];
  else
    top[x] = x;
  if (linker[x].size() != 1 && x != 1) son[fa[top[x]]].push_back(x);
  if (x != 1) {
    if (w[x] != 26) up[x][w[x]] = 1;
    if (top[x] != x)
      for (int i = 0; i < 26; i++) up[x][i] += up[fa[x]][i];
  }
  if (linker[x].empty()) mndep = min(mndep, dep[x]);
  down[top[x]] = x;
  for (pair<int, int> cur : linker[x]) {
    int to = cur.first;
    w[to] = cur.second;
    dfs(to);
  }
}
void dfs2(int x) {
  for (int cur : son[x]) {
    dfs2(cur);
    for (int i = 0; i < 26; i++) f[x][i] = max(f[x][i], f[cur][i] + up[cur][i]);
  }
  for (int i = 0; i < 26; i++) sum[x] += f[x][i];
  if (sum[x] > mxdep - dep[x]) mark[x] = 1, ++cnt;
}
char s[5];
void Modify(int x, int c, int v) {
  up[x][c] += v;
  int now = x;
  while (now != 1) {
    now = fa[top[now]];
    sum[now] -= f[now][c];
    f[now][c] = 0;
    for (int cur : son[now]) f[now][c] = max(f[now][c], f[cur][c] + up[cur][c]);
    sum[now] += f[now][c];
    if (!mark[now]) {
      if (sum[now] > mxdep - dep[now]) mark[now] = 1, ++cnt;
    } else {
      if (sum[now] <= mxdep - dep[now]) mark[now] = 0, --cnt;
    }
  }
}
int main() {
  n = read(), q = read();
  for (int i = 2; i <= n; i++) {
    fa[i] = read();
    scanf("%s", s + 1);
    int c = s[1] == '?' ? 26 : s[1] - 'a';
    addedge(fa[i], i, c);
  }
  fa[1] = top[1] = 1, dfs(1), dfs2(1);
  if (mndep != mxdep) {
    while (q--) puts("Fou");
    return 0;
  }
  for (int t = 1; t <= q; t++) {
    int x = read();
    scanf("%s", s + 1);
    int c = s[1] == '?' ? 26 : s[1] - 'a', ans = 0;
    if (w[x] != 26) Modify(down[top[x]], w[x], -1);
    w[x] = c;
    if (w[x] != 26) Modify(down[top[x]], w[x], 1);
    for (int i = 0; i < 26; i++)
      ans += (f[1][i] + mxdep - sum[1] - 1) * (i + 1);
    if (cnt)
      puts("Fou");
    else
      printf("Shi %d\n", ans);
  }
  return 0;
}
