#include <bits/stdc++.h>
using namespace std;
int p[150000];
char c[150000];
vector<int> adjList[150000], adjList2[150000];
int depth[150000], pp[150000], down[150000];
int doDFS(int u, int d, int p) {
  int i;
  depth[u] = d, pp[u] = p;
  if (adjList[u].size() != 1) down[u] = u;
  for (i = 0; i < adjList[u].size(); i++) {
    int v = adjList[u][i];
    doDFS(v, d + 1, (adjList[u].size() == 2) ? u : p);
    if (adjList[u].size() == 1) down[u] = down[v];
  }
  return 0;
}
int cc[150000][26], path[150000][26], con[150000];
int main() {
  int i;
  int n, q;
  int v;
  char ch;
  scanf("%d %d", &n, &q);
  for (i = 1; i < n; i++) {
    scanf("%d %c", &p[i], &c[i]), p[i]--;
    adjList[p[i]].push_back(i);
  }
  int j, k, dd = -1, no = 0;
  doDFS(0, 0, 0);
  for (i = n - 1; i >= 1; i--) {
    if (adjList[i].size() != 1) {
      int u = i;
      while (u != pp[i]) {
        if (c[u] != '?') cc[i][c[u] - 'a']++;
        u = p[u];
      }
      for (j = 0; j < 26; j++)
        path[pp[i]][j] = max(path[pp[i]][j], path[i][j] + cc[i][j]);
      adjList2[pp[i]].push_back(i);
    }
    if (adjList[i].size() == 0) {
      if (dd == -1)
        dd = depth[i];
      else if (dd != depth[i]) {
        for (i = 0; i < q; i++) printf("Fou\n");
        return 0;
      }
    }
  }
  for (i = 0; i < n; i++) {
    if ((i == 0) || (adjList[i].size() != 1)) {
      int s = 0;
      for (j = 0; j < 26; j++) s += path[i][j];
      if (s > dd - depth[i]) con[i] = 1, no++;
    }
  }
  for (i = 0; i < q; i++) {
    scanf("%d %c", &v, &ch), v--;
    if (c[v] != '?') cc[down[v]][c[v] - 'a']--;
    c[v] = ch;
    if (c[v] != '?') cc[down[v]][c[v] - 'a']++;
    v = down[v];
    while (v != 0) {
      int s = 0;
      for (j = 0; j < 26; j++) {
        path[pp[v]][j] = 0;
        for (k = 0; k < adjList2[pp[v]].size(); k++) {
          int w = adjList2[pp[v]][k];
          path[pp[v]][j] = max(path[pp[v]][j], path[w][j] + cc[w][j]);
        }
        s += path[pp[v]][j];
      }
      if (con[pp[v]]) no--;
      con[pp[v]] = (s > dd - depth[pp[v]]);
      if (con[pp[v]]) no++;
      v = pp[v];
    }
    if (no)
      printf("Fou\n");
    else {
      int s = 0, ans = 0;
      for (j = 0; j < 26; j++) s += path[0][j];
      for (j = 0; j < 26; j++) ans += (path[0][j] + dd - s) * (j + 1);
      printf("Shi %d\n", ans);
    }
  }
  return 0;
}
