#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int n, q, len, bad, h[N], a[N], par[N], up[N], cnt[N][30], dp[N][30];
vector<int> adj[N];
char c[5];
void add(int u, int t) {
  int sum = 0;
  for (int i = 0; i < 26; i++) sum += dp[u][i];
  bad += sum > len - h[u] ? t : 0;
}
void update(int u) {
  memset(dp[u], 0, sizeof dp[u]);
  for (auto v : adj[u])
    for (int i = 0; i < 26; i++) dp[u][i] = max(dp[u][i], dp[v][i] + cnt[v][i]);
}
void dfs1(int u) {
  cnt[up[u]][a[u]]++;
  if (adj[u].empty()) len = !len || len == h[u] ? h[u] : -1;
  if (adj[u].size() == 2) {
    adj[up[u]] = adj[u];
    h[up[u]] = h[u];
  }
  for (auto v : adj[u]) {
    up[v] = !u + adj[u].size() > 1 ? v : up[u];
    h[v] = h[u] + 1, dfs1(v);
  }
}
void dfs2(int u) {
  for (auto v : adj[u]) dfs2(v), par[v] = u;
  update(u), add(u, 1);
}
int main() {
  scanf("%d%d", &n, &q);
  for (int u = 1; u < n; u++) {
    scanf("%d%s", par + u, c);
    adj[--par[u]].push_back(u);
    a[u] = c[0] ^ '?' ? c[0] - 'a' : 26;
  }
  dfs1(0), par[0]--, dfs2(0);
  for (int u; q--;) {
    scanf("%d%s", &u, c);
    --u, cnt[up[u]][a[u]]--;
    cnt[up[u]][a[u] = c[0] ^ '?' ? c[0] - 'a' : 26]++;
    for (u = up[u]; ~u; u = par[u]) add(u, -1), update(u), add(u, 1);
    if (bad || !~len) {
      printf("Fou\n");
      continue;
    }
    int sum = len, ans = 0;
    for (int i = 0; i < 26; i++) sum -= dp[0][i];
    for (int i = 0; i < 26; i++) ans += (i + 1) * (dp[0][i] + sum);
    printf("Shi %d\n", ans);
  }
}
