#include <bits/stdc++.h>
using namespace std;
string s[10005], na[105];
int arr[105], g[105], t[105], p[105], n, ss[105], cnt, x, y, z;
int pp[105], gg[105], tt[105];
bool gi = true;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ss[i] >> na[i];
    for (int j = 0; j < ss[i]; j++) cin >> s[cnt++];
  }
  cnt = -1;
  bool ti;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < ss[i]; j++) {
      cnt++;
      gi = true;
      ti = true;
      for (int k = 0; k < 8 && ti; k++) {
        if (s[cnt][k] == '-') continue;
        for (int l = k + 1; l < 8 && ti; l++)
          if (s[cnt][l] == '-')
            continue;
          else if (s[cnt][k] != s[cnt][l])
            ti = false;
      }
      if (ti) {
        t[i]++;
        continue;
      }
      for (int k = 0; k < 8 && gi; k++) {
        if (s[cnt][k] == '-') continue;
        for (int l = k + 1; l < 8 && gi; l++)
          if (s[cnt][l] == '-')
            continue;
          else if (s[cnt][k] <= s[cnt][l])
            gi = false;
      }
      if (gi)
        p[i]++;
      else
        g[i]++;
    }
  }
  int mxt = 1e-9, mxg = 1e-9, mxp = 1e-9, ft, fg, fp;
  bool o = true, k = true, l = true;
  for (int i = 0; i < n; i++)
    mxt = max(mxt, t[i]), mxg = max(mxg, g[i]), mxp = max(mxp, p[i]);
  for (int i = 0; i < n; i++) {
    if (t[i] == mxt) tt[i]++;
    if (t[i] == mxt && o) ft = i, o = false;
    if (g[i] == mxg) gg[i]++;
    if (g[i] == mxg && k) fg = i, k = false;
    if (p[i] == mxp) pp[i]++;
    if (p[i] == mxp && l) fp = i, l = false;
  }
  cout << "If you want to call a taxi, you should call: " << na[ft];
  for (int i = ft + 1; i < n; i++)
    if (tt[i]) cout << ", " << na[i];
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call: " << na[fp];
  for (int i = fp + 1; i < n; i++)
    if (pp[i]) cout << ", " << na[i];
  cout << "." << endl;
  cout << "If you want to go to a cafe with a wonderful girl, you should call: "
       << na[fg];
  for (int i = fg + 1; i < n; i++)
    if (gg[i]) cout << ", " << na[i];
  cout << "." << endl;
}
