#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, C = 26 + 4;
int n, q, h[N], a[N], par[N], up[N];
int len, bad, cnt[N][C], dp[N][C];
vector<int> adj[N];
inline int get_id(char c) { return c ^ '?' ? c - 'a' : 26; }
inline 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;
}
inline void find_dp(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];
    if (len ^ h[u]) {
      while (q--) cout << "Fou\n";
      exit(0);
    }
  }
  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;
  find_dp(u), add(u, 1);
}
inline void read_input() {
  cin >> n >> q;
  for (int u = 1; u < n; u++) {
    char c;
    cin >> par[u] >> c;
    adj[--par[u]].push_back(u);
    a[u] = get_id(c);
  }
}
inline void solve(int u, char c) {
  cnt[up[u]][a[u]]--;
  cnt[up[u]][a[u] = get_id(c)]++;
  for (u = up[u]; ~u; u = par[u]) add(u, -1), find_dp(u), add(u, 1);
  if (bad) {
    cout << "Fou\n";
    return;
  }
  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);
  cout << "Shi " << ans << endl;
}
inline void write_output() {
  dfs1(0), par[0]--, dfs2(0);
  while (q--) {
    int u;
    char c;
    cin >> u >> c;
    solve(--u, c);
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  read_input(), write_output();
  return 0;
}
