#include <bits/stdc++.h>
using namespace std;
int main() {
  std::iostream::sync_with_stdio(false);
  int n;
  cin >> n;
  string s[n];
  int a[n][3], i, j;
  for (i = 0; i < n; i++) a[i][0] = a[i][1] = a[i][2] = 0;
  for (i = 0; i < n; i++) {
    int p;
    cin >> p >> s[i];
    for (j = 0; j < p; j++) {
      string x;
      cin >> x;
      if (x[0] == x[1] && x[0] == x[3] && x[0] == x[4] && x[0] == x[6] &&
          x[0] == x[7])
        a[i][0]++;
      else if (x[0] > x[1] && x[1] > x[3] && x[3] > x[4] && x[4] > x[6] &&
               x[6] > x[7]) {
        a[i][1]++;
      } else
        a[i][2]++;
    }
  }
  int max1 = 0, max2 = 0, max3 = 0;
  for (i = 0; i < n; i++) {
    max1 = max(max1, a[i][0]);
    max2 = max(max2, a[i][1]);
    max3 = max(max3, a[i][2]);
  }
  cout << "If you want to call a taxi, you should call:";
  for (i = 0; i < n; i++) {
    if (a[i][0] == max1) {
      cout << " " << s[i];
      break;
    }
  }
  i++;
  while (i < n) {
    if (a[i][0] == max1) cout << ", " << s[i];
    i++;
  }
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call:";
  for (i = 0; i < n; i++) {
    if (a[i][1] == max2) {
      cout << " " << s[i];
      break;
    }
  }
  i++;
  while (i < n) {
    if (a[i][1] == max2) cout << ", " << s[i];
    i++;
  }
  cout << "." << endl;
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (i = 0; i < n; i++) {
    if (a[i][2] == max3) {
      cout << " " << s[i];
      break;
    }
  }
  i++;
  while (i < n) {
    if (a[i][2] == max3) cout << ", " << s[i];
    i++;
  }
  cout << "." << endl;
  return 0;
}
