#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int girl[N];
int taxi[N];
int pizza[N];
int maxt, maxp, maxg;
map<int, string> mp;
struct number {
  int a;
  int b;
  int c;
};
number inter(string s) {
  number tmp;
  tmp.a = (s[0] - '0') * 10 + (s[1] - '0');
  tmp.b = (s[3] - '0') * 10 + (s[4] - '0');
  tmp.c = (s[6] - '0') * 10 + (s[7] - '0');
  return tmp;
}
void solver(int a) {
  string name;
  int m;
  cin >> m >> name;
  mp[a] = name;
  for (int i = 0; i < m; i++) {
    string s;
    cin >> s;
    number tmp = inter(s);
    if (tmp.a == tmp.b && tmp.a == tmp.c) {
      if (tmp.a % 11 == 0) {
        taxi[a]++;
        maxt = max(maxt, taxi[a]);
        continue;
      }
    }
    set<char> se = {s[0], s[1], s[3], s[4], s[6], s[7]};
    if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
        s[6] > s[7] && se.size() == 6) {
      pizza[a]++;
      maxp = max(maxp, pizza[a]);
      continue;
    }
    girl[a]++;
    maxg = max(maxg, girl[a]);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    solver(i);
  }
  cout << "If you want to call a taxi, you should call: ";
  vector<string> names;
  for (int i = 0; i < n; i++) {
    if (taxi[i] == maxt) {
      names.push_back(mp[i]);
    }
  }
  for (int i = 0; i < names.size(); i++) {
    cout << names[i];
    if (i == names.size() - 1) {
      cout << ".";
    } else {
      cout << ", ";
    }
  }
  cout << endl;
  cout << "If you want to order a pizza, you should call: ";
  names.clear();
  for (int i = 0; i < n; i++) {
    if (pizza[i] == maxp) {
      names.push_back(mp[i]);
    }
  }
  for (int i = 0; i < names.size(); i++) {
    cout << names[i];
    if (i == names.size() - 1) {
      cout << ".";
    } else {
      cout << ", ";
    }
  }
  cout << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  names.clear();
  for (int i = 0; i < n; i++) {
    if (girl[i] == maxg) {
      names.push_back(mp[i]);
    }
  }
  for (int i = 0; i < names.size(); i++) {
    cout << names[i];
    if (i == names.size() - 1) {
      cout << ".";
    } else {
      cout << ", ";
    }
  }
  cout << endl;
}
