#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 150 * 1000 + 5;
int n, q, par[MAX_N], up[MAX_N], cnt[MAX_N][26 + 5], h[MAX_N], tree_h,
    let[MAX_N];
vector<int> adj[MAX_N], vec;
bool good[MAX_N], all_good = true, mark[MAX_N];
int convert(char c) {
  if (c == '?') return 26;
  return c - 'a';
}
void read_tree() {
  cin >> n >> q;
  for (int i = 1; i < n; i++) {
    char c;
    cin >> par[i] >> c;
    par[i]--;
    let[i] = convert(c);
    adj[par[i]].push_back(i);
  }
}
void dfs(int v, int cur_h = 0, int x = 0) {
  if (adj[v].empty()) {
    if (!tree_h || tree_h == cur_h)
      good[v] = true;
    else
      all_good = false;
    tree_h = cur_h;
    vec.push_back(v);
  }
  h[v] = cur_h;
  up[v] = x;
  for (int u : adj[v]) {
    if (adj[v].size() == 2 || !v) x = u;
    dfs(u, cur_h + 1, x);
  }
}
void update(int v) {
  int t = 0;
  for (int i = 0; i < 26; i++) {
    int cnt_old = cnt[v][i];
    cnt[v][i] = 0;
    for (int u : adj[v]) cnt[v][i] = max(cnt[v][i], cnt[u][i] + (let[u] == i));
    t += cnt[v][i];
    if (up[v] != v) cnt[up[v]][i] += cnt[v][i] - cnt_old;
  }
  good[v] = t <= tree_h - h[v];
  for (int u : adj[v]) good[v] &= good[u];
  good[up[v]] = good[v];
}
void solve() {
  dfs(0);
  mark[0] = true;
  for (int i = 0; i < (int)vec.size(); i++) {
    int v = vec[i];
    if (!mark[par[v]]) {
      vec.push_back(par[v]);
      mark[par[v]] = true;
    }
  }
  for (int v : vec) update(v);
  for (int i = 0; i < n; i++) par[i] = par[up[i]];
}
int find_ans() {
  int t = 0;
  for (int i = 0; i < 26; i++) t += cnt[0][i];
  int res = 0;
  for (int i = 0; i < 26; i++) res += (i + 1) * (tree_h - t + cnt[0][i]);
  return res;
}
void read_queries() {
  for (int i = 0; i < q; i++) {
    int v;
    char c;
    cin >> v >> c;
    v--;
    if (up[v] != v) {
      cnt[up[v]][let[v]]--;
      cnt[up[v]][convert(c)]++;
    }
    let[v] = convert(c);
    while (v && all_good) {
      update(par[v]);
      v = par[v];
    }
    if (good[0])
      cout << "Shi " << find_ans() << endl;
    else
      cout << "Fou" << endl;
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  read_tree();
  solve();
  read_queries();
}
