#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 256;
const char nxt = '\n';
inline void in(string Q) {
  Q += ".in";
  freopen(Q.c_str(), "r", stdin);
}
inline void out(string Q) {
  Q += ".out";
  freopen(Q.c_str(), "w", stdout);
}
inline void open_file(string Q) {
  in(Q);
  out(Q);
}
inline bool Pal(const string& s) {
  return equal(s.begin(), s.end(), s.rbegin());
}
vector<string> taxi, pizza, frienD;
string change(string& X) {
  string ret = "";
  for (auto to : X)
    if (to != '-') ret.push_back(to);
  return ret;
}
int check(string x) {
  x = change(x);
  if (int(x.size()) != 6) return 2;
  string cur = "";
  cur += x[0];
  for (auto to : x) {
    if (to != cur.back()) cur.push_back(to);
  }
  if (int(cur.size()) == 1) return 1;
  cur = x;
  sort(cur.begin(), cur.end());
  reverse(cur.begin(), cur.end());
  char last = '.';
  bool ok = 1;
  for (auto to : cur) {
    if (to == last) {
      ok = 0;
      break;
    }
    last = to;
  }
  if (cur == x && ok) return 0;
  return 2;
}
map<string, int> M[10], tax, piz, fr;
vector<string> nm;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (0) open_file("");
  int n;
  cin >> n;
  while (n--) {
    int kol;
    string name, phone;
    cin >> kol >> name;
    nm.push_back(name);
    M[0][name] = M[1][name] = M[2][name] = 0;
    while (kol--) {
      cin >> phone;
      int D = check(phone);
      M[D][name]++;
    }
  }
  for (int i = 0; i < 3; ++i) {
    int mx = 0;
    for (auto to : M[i]) {
      mx = max(mx, to.second);
    }
    if (!mx) {
      for (auto it : nm) {
        if (!tax[it] && i == 1) {
          tax[it] = 1;
          taxi.push_back(it);
        }
        if (!piz[it] && !i) {
          pizza.push_back(it);
          piz[it] = 1;
        }
        if (!fr[it] && i == 2) {
          fr[it] = 1;
          frienD.push_back(it);
        }
      }
      continue;
    }
    if (i == 1) {
      for (auto it : nm) {
        for (auto to : M[i]) {
          if (to.second == mx && it == to.first && !tax[it]) {
            taxi.push_back(it);
            tax[it] = 1;
          }
        }
      }
    }
    if (i == 0) {
      for (auto it : nm) {
        for (auto to : M[i]) {
          if (to.second == mx && it == to.first && !piz[it]) {
            pizza.push_back(it);
            piz[it] = 1;
          }
        }
      }
    }
    if (i == 2) {
      for (auto it : nm) {
        for (auto to : M[i]) {
          if (to.second == mx && it == to.first && !fr[it]) {
            frienD.push_back(it);
            fr[it] = 1;
          }
        }
      }
    }
  }
  cout << "If you want to call a taxi, you should call:";
  string ans = "";
  for (auto to : taxi) ans += " " + to + ",";
  ans.pop_back();
  ans += ".";
  cout << ans;
  ans = "";
  cout << nxt << "If you want to order a pizza, you should call:";
  for (auto to : pizza) ans += " " + to + ",";
  ans.pop_back();
  ans += ".";
  cout << ans;
  ans = "";
  cout << nxt
       << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (auto to : frienD) ans += " " + to + ",";
  ans.pop_back();
  ans += ".";
  cout << ans;
  return 0;
}
