#include <bits/stdc++.h>
using namespace std;
int main() {
  do {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
  } while (false);
  int n, q;
  cin >> n >> q;
  vector<int> fa(n), dep(n), son(n);
  vector<char> ch(n);
  for (int i = 1; i < n; i++) {
    cin >> fa[i] >> ch[i];
    fa[i]--;
    dep[i] = dep[fa[i]] + 1;
    son[fa[i]]++;
  }
  vector<int> length(n);
  for (int u = n - 1; u; u--) {
    if (length[fa[u]] && length[fa[u]] != length[u] + 1) {
      for (int i = 0; i < q; i++) {
        cout << "Fou"
             << "\n";
      }
      return 0;
    }
    length[fa[u]] = length[u] + 1;
  }
  vector<int> top(n), last(n), sum(n);
  vector<vector<int> > appear(n, vector<int>(26));
  for (int i = 0; i < n; i++) {
    if (son[fa[i]] > 1 || !fa[i]) {
      top[i] = fa[i];
      last[i] = i;
    } else {
      top[i] = top[fa[i]];
      last[i] = last[fa[i]];
    }
    if (i && ch[i] != '?') {
      appear[last[i]][ch[i] - 'a']++;
    }
  }
  vector<vector<int> > graph(n), dp(n, vector<int>(26));
  for (int u = n - 1; u; u--) {
    if (son[u] != 1) {
      for (int i = 0; i < 26; i++) {
        dp[top[u]][i] = max(dp[top[u]][i], dp[u][i] + appear[last[u]][i]);
      }
      graph[top[u]].push_back(u);
    }
  }
  int fail = 0;
  for (int u = 0; u < n; u++) {
    for (int i = 0; i < 26; i++) {
      sum[u] += dp[u][i];
    }
    if (sum[u] > length[u]) {
      fail++;
    }
  }
  top[0] = -1;
  auto update = [&](int u, int c) {
    while (~u) {
      if (sum[u] > length[u]) {
        fail--;
      }
      sum[u] -= dp[u][c];
      dp[u][c] = 0;
      for (int v : graph[u]) {
        dp[u][c] = max(dp[u][c], dp[v][c] + appear[last[v]][c]);
      }
      sum[u] += dp[u][c];
      if (sum[u] > length[u]) {
        fail++;
      }
      u = top[u];
    }
  };
  for (int i = 0; i < q; i++) {
    int u;
    char c;
    cin >> u >> c;
    u--;
    if (ch[u] != '?') {
      appear[last[u]][ch[u] - 'a']--;
      update(last[u], ch[u] - 'a');
    }
    ch[u] = c;
    if (ch[u] != '?') {
      appear[last[u]][ch[u] - 'a']++;
      update(last[u], ch[u] - 'a');
    }
    if (fail) {
      cout << "Fou"
           << "\n";
    } else {
      cout << "Shi ";
      int answer = 0;
      for (int j = 0; j < 26; j++) {
        answer += (j + 1) * (dp[0][j] + length[0] - sum[0]);
      }
      cout << answer << "\n";
    }
  }
  return 0;
}
