#include <bits/stdc++.h>
using namespace std;
const int MAXN = 150050;
int l[MAXN], r[MAXN], p[MAXN], n, q;
int cnt[MAXN][26], c[MAXN];
void readInput() {
  scanf("%d%d", &n, &q);
  for (int v = 2; v <= n; v++) {
    char s[2];
    scanf("%d%s", &p[v], s);
    if (!l[p[v]])
      l[p[v]] = v;
    else
      r[p[v]] = v;
    c[v] = (s[0] != '?') ? (s[0] - 'a') : -1;
    if (c[v] != -1) cnt[v][c[v]]++;
  }
}
int sz[MAXN], len;
bool checkTree() {
  sz[1] = 0;
  queue<int> que;
  que.push(1);
  while (!que.empty()) {
    int v = que.front();
    que.pop();
    if (l[v]) {
      sz[l[v]] = sz[v] + 1;
      que.push(l[v]);
    }
    if (r[v]) {
      sz[r[v]] = sz[v] + 1;
      que.push(r[v]);
    }
  }
  len = -1;
  for (int v = 1; v <= n; v++) {
    if (l[v] || r[v]) continue;
    if (len != -1 && len != sz[v]) return false;
    len = sz[v];
  }
  for (int v = 1; v <= n; v++) sz[v] = len - sz[v];
  return true;
}
int f[MAXN];
void compress() {
  for (int v = 2; v <= n; v++) {
    if ((l[v] && r[v]) || (!l[v] && !r[v])) {
      int x = p[v];
      bool isLeft = (l[p[v]] == v);
      while (!l[x] || !r[x]) {
        if (x == 1) break;
        f[x] = v;
        for (int i = 0; i < 26; i++) cnt[v][i] += cnt[x][i];
        isLeft = (l[p[x]] == x);
        x = p[x];
      }
      p[v] = x;
      if (isLeft)
        l[x] = v;
      else
        r[x] = v;
    }
  }
}
int dp[MAXN][26], sum[MAXN], bad;
void dfs(int v) {
  if (!l[v] && !r[v]) return;
  if (l[v]) dfs(l[v]);
  if (r[v]) dfs(r[v]);
  for (int i = 0; i < 26; i++) dp[v][i] = dp[l[v]][i] + cnt[l[v]][i];
  if (r[v])
    for (int i = 0; i < 26; i++)
      dp[v][i] = max(dp[v][i], dp[r[v]][i] + cnt[r[v]][i]);
  for (int i = 0; i < 26; i++) sum[v] += dp[v][i];
  if (sum[v] > sz[v]) bad++;
}
void update(int v, char t) {
  int x = c[v];
  int y = (t != '?') ? (t - 'a') : -1;
  c[v] = y;
  if (f[v]) v = f[v];
  if (x != -1) cnt[v][x]--;
  if (y != -1) cnt[v][y]++;
  v = p[v];
  while (v) {
    int db = 0;
    if (sum[v] > sz[v]) db--;
    for (int i : {x, y}) {
      if (i == -1) continue;
      int val = 0;
      if (l[v]) val = max(val, dp[l[v]][i] + cnt[l[v]][i]);
      if (r[v]) val = max(val, dp[r[v]][i] + cnt[r[v]][i]);
      sum[v] += (val - dp[v][i]);
      dp[v][i] = val;
    }
    if (sum[v] > sz[v]) db++;
    bad += db;
    v = p[v];
  }
}
int calc() {
  int res = (sz[1] - sum[1]) * 351;
  for (int i = 0; i < 26; i++) res += dp[1][i] * (i + 1);
  return res;
}
int main() {
  readInput();
  if (!checkTree()) {
    for (int i = 0; i < q; i++) printf("Fou\n");
    return 0;
  }
  compress();
  dfs(1);
  for (int i = 0; i < q; i++) {
    int v;
    char s[2];
    scanf("%d%s", &v, s);
    update(v, s[0]);
    if (bad)
      printf("Fou\n");
    else
      printf("Shi %d\n", calc());
  }
}
