#include <bits/stdc++.h>
struct vertex {
  int parent;
  int c1, c2;
  int depth;
  int top;
  int sum[26];
  int dp[26];
  char ch;
  bool bug;
} v[300003];
int bugn, xdepth;
int n, m;
void update(int i) {
  int sum = 0;
  int top = v[i].top;
  for (int j = 0; j < 26; ++j) {
    sum += v[top].dp[j] = std::max(v[v[i].c1].dp[j] + v[v[i].c1].sum[j],
                                   v[v[i].c2].dp[j] + v[v[i].c2].sum[j]);
  }
  if (v[i].bug) {
    v[i].bug = false;
    --bugn;
  }
  if (sum + v[i].depth > xdepth) {
    v[i].bug = true;
    ++bugn;
  }
}
void dfs1(int i) {
  if (v[i].top == -1) {
    v[i].top = i;
  }
  if (v[i].c1 != -1 && v[i].c2 == -1) {
    v[v[i].c1].top = v[i].top;
  }
  if (v[i].c1 != -1) dfs1(v[i].c1);
  if (v[i].c2 != -1) dfs1(v[i].c2);
  if (v[i].c1 != -1 && v[i].c2 != -1) {
    update(i);
  }
  if (v[i].ch != 26) v[v[i].top].sum[v[i].ch]++;
}
int main() {
  scanf("%d%d", &n, &m);
  v[0].parent = -1;
  for (int i = 0; i < n; ++i) {
    v[i].c1 = v[i].c2 = v[i].top = -1;
  }
  xdepth = -1;
  v[0].ch = 26;
  for (int i = 1; i < n; ++i) {
    int a;
    char c;
    scanf("%d %c", &a, &c);
    --a;
    if (c == '?')
      c = 26;
    else
      c = c - 'a';
    v[i].parent = a;
    v[i].ch = c;
    if (v[a].c1 == -1)
      v[a].c1 = i;
    else
      v[a].c2 = i;
    v[i].depth = v[a].depth + 1;
  }
  for (int i = 0; i < n; ++i) {
    if (v[i].c1 == -1) {
      if (xdepth == -1)
        xdepth = v[i].depth;
      else if (v[i].depth != xdepth) {
        xdepth = -2;
      }
    }
  }
  dfs1(0);
  for (int i = 0; i < m; ++i) {
    int a;
    char c;
    scanf("%d %c", &a, &c);
    --a;
    if (c == '?') {
      c = 26;
    } else {
      c -= 'a';
    }
    if (v[a].ch != 26) v[v[a].top].sum[v[a].ch]--;
    v[a].ch = c;
    if (v[a].ch != 26) v[v[a].top].sum[v[a].ch]++;
    for (int j = v[a].top; j != 0; j = v[v[j].parent].top) {
      update(v[j].parent);
    }
    if (bugn > 0) {
      printf("Fou\n");
    } else {
      printf("Shi\n");
      int sum = 0;
      for (int j = 0; j < 26; ++j) sum += v[0].dp[j] + v[0].sum[j];
      long long int ans = 0;
      for (int j = 0; j < 26; ++j) {
        ans += (j + 1) * (xdepth - sum + v[0].dp[j] + v[0].sum[j]);
      }
      printf("%I64d\n", ans);
    }
  }
}
