#include <bits/stdc++.h>
using namespace std;
int n, a[100], t[100], g[100], p[100], kachal, khafan, dahan;
string b[100], madar;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cin >> b[i];
    for (int j = 0; j < a[i]; j++) {
      cin >> madar;
      if (madar[0] == madar[1] && madar[0] == madar[3] &&
          madar[0] == madar[4] && madar[0] == madar[6] && madar[0] == madar[7])
        t[i]++;
      else if (int(madar[0]) > int(madar[1]) && int(madar[1]) > int(madar[3]) &&
               int(madar[3]) > int(madar[4]) && int(madar[4]) > int(madar[6]) &&
               int(madar[6]) > int(madar[7]))
        p[i]++;
      else
        g[i]++;
    }
    if (t[i] > khafan) khafan = t[i];
    if (p[i] > kachal) kachal = p[i];
    if (g[i] > dahan) dahan = g[i];
  }
  int k = 0;
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < n; i++) {
    if (k == 0 && t[i] == khafan) {
      cout << b[i];
      k++;
    } else if (t[i] == khafan)
      cout << ", " << b[i];
  }
  k = 0;
  cout << "." << endl << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < n; i++) {
    if (k == 0 && p[i] == kachal) {
      cout << b[i];
      k++;
    } else if (p[i] == kachal)
      cout << ", " << b[i];
  }
  k = 0;
  cout
      << "." << endl
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < n; i++) {
    if (k == 0 && g[i] == dahan) {
      cout << b[i];
      k++;
    } else if (g[i] == dahan)
      cout << ", " << b[i];
  }
  cout << "." << endl;
  return 0;
}
