#include <bits/stdc++.h>
using namespace std;
int s[111][3];
vector<string> na, res[3];
set<int> se;
int change(string s, int n, int m) { return (s[n] - '0') * 10 + s[m] - '0'; }
int f(string s) {
  se.clear();
  if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
      s[6] == 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;
  else
    return 2;
}
int main() {
  memset(s, 0, sizeof s);
  int n;
  string t;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m >> t;
    na.push_back(t);
    for (int j = 0; j < m; j++) {
      cin >> t;
      s[i][f(t)]++;
    }
  }
  for (int h = 0; h < 3; h++) {
    int ss = -3;
    for (int i = 0; i < n; i++) ss = max(ss, s[i][h]);
    for (int i = 0; i < n; i++)
      if (s[i][h] == ss) res[h].push_back(na[i]);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < res[0].size(); i++) {
    cout << res[0][i];
    if (i != res[0].size() - 1) cout << ", ";
  }
  cout << '.' << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < res[1].size(); i++) {
    cout << res[1][i];
    if (i != res[1].size() - 1) cout << ", ";
  }
  cout << '.' << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < res[2].size(); i++) {
    cout << res[2][i];
    if (i != res[2].size() - 1) cout << ", ";
  }
  cout << '.' << endl;
}
