#include <bits/stdc++.h>
using namespace std;
struct tt {
  int n, cnt[3];
  string name, num[101];
} p[103];
int f(string s) {
  if (s[0] == s[1] && s[0] == s[3] && s[0] == s[4] && s[0] == s[6] &&
      s[0] == s[7])
    return 0;
  if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] && s[6] > s[7])
    return 1;
  return 2;
}
int main() {
  int i, j, n;
  int mm[3];
  while (cin >> n) {
    for (i = 0; i < n; ++i) {
      cin >> p[i].n >> p[i].name;
      p[i].cnt[0] = p[i].cnt[1] = p[i].cnt[2] = 0;
      for (j = 0; j < p[i].n; ++j) {
        cin >> p[i].num[j];
        p[i].cnt[f(p[i].num[j])]++;
      }
    }
    mm[0] = mm[1] = mm[2] = -1;
    for (i = 0; i < n; ++i)
      for (j = 0; j < 3; ++j) mm[j] = max(mm[j], p[i].cnt[j]);
    j = 1;
    cout << "If you want to call a taxi, you should call:";
    for (i = 0; i < n; ++i)
      if (p[i].cnt[0] == mm[0]) {
        if (j)
          j = 0;
        else
          cout << ",";
        cout << " " << p[i].name;
      }
    cout << "." << endl;
    j = 1;
    cout << "If you want to order a pizza, you should call:";
    for (i = 0; i < n; ++i)
      if (p[i].cnt[1] == mm[1]) {
        if (j)
          j = 0;
        else
          cout << ",";
        cout << " " << p[i].name;
      }
    cout << "." << endl;
    j = 1;
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call:";
    for (i = 0; i < n; ++i)
      if (p[i].cnt[2] == mm[2]) {
        if (j)
          j = 0;
        else
          cout << ",";
        cout << " " << p[i].name;
      }
    cout << "." << endl;
  }
  return 0;
}
