#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
struct fastio {
  char s[100000];
  int it, len;
  fastio() { it = len = 0; }
  inline char get() {
    if (it < len) return s[it++];
    it = 0;
    len = fread(s, 1, 100000, stdin);
    if (len == 0)
      return EOF;
    else
      return s[it++];
  }
  bool notend() {
    char c = get();
    while (c == ' ' || c == '\n') c = get();
    if (it > 0) it--;
    return c != EOF;
  }
} _buff;
inline long long getnum() {
  long long r = 0;
  bool ng = 0;
  char c;
  c = _buff.get();
  while (c != '-' && (c < '0' || c > '9')) c = _buff.get();
  if (c == '-') ng = 1, c = _buff.get();
  while (c >= '0' && c <= '9') r = r * 10 + c - '0', c = _buff.get();
  return ng ? -r : r;
}
template <class T>
inline void putnum(T x) {
  if (x < 0) putchar('-'), x = -x;
  register short a[20] = {}, sz = 0;
  while (x) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
inline char getreal() {
  char c = _buff.get();
  while (c <= 32) c = _buff.get();
  return c;
}
long long qpow(long long x, long long k) {
  return k == 0 ? 1
                : 1ll * qpow(1ll * x * x % mod, k >> 1) * (k & 1 ? x : 1) % mod;
}
const int maxn = 150111;
int n, q;
struct SGT {
  struct node {
    int mx, lz;
    void addlz(int L) {
      lz += L;
      mx += L;
    }
  } a[maxn * 4];
  void pushdown(int p) {
    if (a[p].lz) {
      a[p << 1].addlz(a[p].lz);
      a[p << 1 | 1].addlz(a[p].lz);
      a[p].lz = 0;
    }
  }
  void update(int p) { a[p].mx = max(a[p << 1].mx, a[p << 1 | 1].mx); }
  void add(int x, int y, int v, int l = 1, int r = n, int p = 1) {
    if (r < x || y < l) return;
    if (x <= l && r <= y) {
      a[p].addlz(v);
      return;
    }
    pushdown(p);
    int m = l + r >> 1;
    add(x, y, v, l, m, p << 1);
    add(x, y, v, m + 1, r, p << 1 | 1);
    update(p);
  }
  int query(int x, int y, int l = 1, int r = n, int p = 1) {
    if (x <= l && r <= y) return a[p].mx;
    pushdown(p);
    int m = l + r >> 1;
    if (x <= m && m < y)
      return max(query(x, y, l, m, p << 1), query(x, y, m + 1, r, p << 1 | 1));
    else if (x <= m)
      return query(x, y, l, m, p << 1);
    else
      return query(x, y, m + 1, r, p << 1 | 1);
  }
  int querynxt(int x, int v, int l = 1, int r = n, int p = 1) {
    if (r < x || a[p].mx < v) return n + 1;
    if (x <= l && l == r) return l;
    pushdown(p);
    int m = l + r >> 1;
    int ret = querynxt(x, v, l, m, p << 1);
    if (ret != n + 1)
      return ret;
    else
      return querynxt(x, v, m + 1, r, p << 1 | 1);
  }
  int querypre(int x, int v, int l = 1, int r = n, int p = 1) {
    if (x < l || a[p].mx < v) return 0;
    if (r <= x && l == r) return r;
    pushdown(p);
    int m = l + r >> 1;
    int ret = querypre(x, v, m + 1, r, p << 1 | 1);
    if (ret != 0)
      return ret;
    else
      return querypre(x, v, l, m, p << 1);
  }
  void build(int ia[], int l, int r, int p) {
    a[p].lz = 0;
    if (l == r) {
      a[p].mx = ia[l];
      return;
    }
    int m = l + r >> 1;
    build(ia, l, m, p << 1);
    build(ia, m + 1, r, p << 1 | 1);
    update(p);
  }
} T[26];
struct LCT {
  struct node {
    int go[2], fa, lz;
    int v, mn, icnt;
    bool flag;
    node() { mn = 1e9; }
    void addlz(int L) {
      v += L;
      lz += L;
      mn += L;
    }
    int getiv() const { return mn < 0 || flag; }
  } a[maxn];
  void update(int p) {
    a[p].flag = a[a[p].go[0]].flag | a[a[p].go[1]].flag | (a[p].icnt > 0);
    a[p].mn = min(min(a[a[p].go[0]].mn, a[a[p].go[1]].mn), a[p].v);
  }
  void pushdown(int p) {
    if (a[p].lz) {
      if (a[p].go[0]) a[a[p].go[0]].addlz(a[p].lz);
      if (a[p].go[1]) a[a[p].go[1]].addlz(a[p].lz);
      a[p].lz = 0;
    }
  }
  int getdir(int p) {
    return a[a[p].fa].go[0] == p ? 0 : (a[a[p].fa].go[1] == p ? 1 : -1);
  }
  void rotate(int p, int d) {
    int q = a[p].go[d];
    int r = a[q].go[d ^ 1];
    if (getdir(p) != -1) a[a[p].fa].go[getdir(p)] = q;
    a[q].go[d ^ 1] = p;
    a[p].go[d] = r;
    a[q].fa = a[p].fa;
    a[p].fa = q;
    a[r].fa = p;
    update(p);
  }
  void pushroute(int p) {
    if (getdir(p) != -1) pushroute(a[p].fa);
    pushdown(p);
  }
  void splay(int p) {
    pushroute(p);
    while (getdir(p) != -1) {
      int q = a[p].fa, r = a[q].fa;
      int dq = getdir(p), dr = getdir(q);
      if (dr == -1)
        rotate(q, dq);
      else {
        if (dq == dr)
          rotate(r, dr), rotate(q, dq);
        else
          rotate(q, dq), rotate(r, dr);
      }
    }
    update(p);
  }
  void delete_rson(int p) {
    if (!a[p].go[1]) return;
    a[p].icnt += a[a[p].go[1]].getiv();
    a[p].go[1] = 0;
  }
  int rt;
  void access(int p) {
    if (!p) return;
    rt = p;
    splay(p);
    delete_rson(p);
    update(p);
    while (a[p].fa) {
      splay(a[p].fa);
      delete_rson(a[p].fa);
      a[a[p].fa].icnt -= a[p].getiv();
      a[a[p].fa].go[1] = p;
      splay(p);
    }
  }
  void add_route_to_root(int p, int v) {
    if (!p) return;
    access(p);
    a[p].addlz(v);
  }
  bool query() { return a[rt].mn >= 0 && !a[rt].flag; }
} lct;
vector<int> son[maxn];
int dfn[maxn], dfnr[maxn], dtot;
int fa[maxn][20], cnt[maxn][26], ia[26][maxn];
int dep[maxn], maxdep;
char s[maxn];
void dfs(int x) {
  maxdep = max(maxdep, dep[x]);
  dfn[x] = ++dtot;
  for (int i = 1; i < 20; i++) fa[x][i] = fa[fa[x][i - 1]][i - 1];
  for (auto u : son[x]) {
    for (int i = 0; i < 26; i++)
      ia[i][dtot + 1] = ia[i][dfn[x]] + (s[u] == 'a' + i);
    dep[u] = dep[x] + 1;
    dfs(u);
    lct.a[u].fa = x;
    lct.a[x].icnt += lct.a[u].getiv();
    for (int i = 0; i < 26; i++)
      cnt[x][i] = max(cnt[x][i], cnt[u][i] + (s[u] == 'a' + i));
  }
  int sum = 0;
  for (int i = 0; i < 26; i++) sum += cnt[x][i];
  lct.a[x].v = maxdep - dep[x] - sum;
  lct.update(x);
  dfnr[x] = dtot;
}
void add_letter(int x, int c, int v) {
  c -= 'a';
  int curmx = T[c].query(dfn[x], dfnr[x]) + (v > 0);
  T[c].add(dfn[x], dfnr[x], v);
  int l, r;
  r = T[c].querynxt(dfnr[x] + 1, curmx);
  l = T[c].querypre(dfn[x] - 1, curmx);
  int p = x;
  for (int i = 19; i >= 0; i--) {
    if (fa[p][i] && dfn[fa[p][i]] > l && dfnr[fa[p][i]] < r) {
      p = fa[p][i];
    }
  }
  lct.add_route_to_root(fa[x][0], -v);
  lct.add_route_to_root(fa[p][0], v);
}
int main() {
  n = getnum(), q = getnum();
  for (int i = 2; i <= n; i++) {
    int p;
    p = getnum();
    char c = getreal();
    s[i] = c;
    son[p].push_back(i);
    fa[i][0] = p;
  }
  dfs(1);
  lct.rt = 1;
  bool ok = true;
  for (int i = 1; i <= n; i++)
    if (son[i].size() == 0 && dep[i] != maxdep) {
      ok = false;
    }
  for (int i = 0; i < 26; i++) T[i].build(ia[i], 1, n, 1);
  for (int i = 1; i <= q; i++) {
    int x;
    x = getnum();
    char c = getreal();
    if (s[x] != '?') add_letter(x, s[x], -1);
    s[x] = c;
    if (c != '?') add_letter(x, s[x], 1);
    if (ok && lct.query()) {
      int ans = 0, sum = 0;
      int a[26];
      for (int j = 0; j < 26; j++) a[j] = T[j].a[1].mx, sum += a[j];
      for (int j = 0; j < 26; j++) ans += (j + 1) * (maxdep - sum + a[j]);
      printf("Shi %d\n", ans);
    } else {
      puts("Fou");
    }
  }
  return 0;
}
