#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, k;
  cin >> n;
  string s[n], t;
  vector<vector<int> > v(n, vector<int>(3, 0));
  for (i = 0; i < n; i++) {
    cin >> k >> s[i];
    for (j = 0; j < k; j++) {
      cin >> t;
      if (t[0] == t[1] && t[1] == t[3] && t[3] == t[4] && t[4] == t[6] &&
          t[6] == t[7])
        v[i][0]++;
      else if (t[0] > t[1] && t[1] > t[3] && t[3] > t[4] && t[4] > t[6] &&
               t[6] > t[7])
        v[i][1]++;
      else
        v[i][2]++;
    }
  }
  vector<vector<string> > ans(3);
  int m0 = 0, m1 = 0, m2 = 0;
  for (i = 0; i < n; i++) {
    if (v[i][0] > m0) {
      m0 = v[i][0];
      ans[0].clear();
      ans[0].push_back(s[i]);
    } else if (v[i][0] == m0)
      ans[0].push_back(s[i]);
    if (v[i][1] > m1) {
      m1 = v[i][1];
      ans[1].clear();
      ans[1].push_back(s[i]);
    } else if (v[i][1] == m1)
      ans[1].push_back(s[i]);
    if (v[i][2] > m2) {
      m2 = v[i][2];
      ans[2].clear();
      ans[2].push_back(s[i]);
    } else if (v[i][2] == m2)
      ans[2].push_back(s[i]);
  }
  cout << "If you want to call a taxi, you should call:";
  for (i = 0; i < ans[0].size() - 1; i++) cout << " " << ans[0][i] << ",";
  cout << " " << ans[0][i] << "." << endl;
  cout << "If you want to order a pizza, you should call:";
  for (i = 0; i < ans[1].size() - 1; i++) cout << " " << ans[1][i] << ",";
  cout << " " << ans[1][i] << "." << endl;
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (i = 0; i < ans[2].size() - 1; i++) cout << " " << ans[2][i] << ",";
  cout << " " << ans[2][i] << "." << endl;
}
