#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  string str, temp;
  int t, flag = 0;
  int x, y, z;
  char c;
  int r1 = 0, r2 = 0, r3 = 0;
  vector<vector<string> > v(3);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    cin >> str;
    x = 0, y = 0, z = 0;
    for (int j = 0; j < t; j++) {
      cin >> temp;
      c = temp[0];
      if (temp[1] == c && temp[3] == c && temp[4] == c && temp[6] == c &&
          temp[7] == c) {
        x++;
      } else if (temp[1] < c && temp[3] < temp[1] && temp[4] < temp[3] &&
                 temp[6] < temp[4] && temp[7] < temp[6]) {
        y++;
      } else {
        z++;
      }
    }
    if (x > r1) {
      r1 = x;
      v[0].clear();
      v[0].push_back(str);
    } else if (x == r1)
      v[0].push_back(str);
    if (y > r2) {
      r2 = y;
      v[1].clear();
      v[1].push_back(str);
    } else if (y == r2)
      v[1].push_back(str);
    if (z > r3) {
      r3 = z;
      v[2].clear();
      v[2].push_back(str);
    } else if (z == r3)
      v[2].push_back(str);
  }
  cout << "If you want to call a taxi, you should call: ";
  cout << v[0][0];
  for (int i = 1; i < v[0].size(); i++) {
    cout << ", " << v[0][i];
  }
  cout << ".\n";
  cout << "If you want to order a pizza, you should call: ";
  cout << v[1][0];
  for (int i = 1; i < v[1].size(); i++) {
    cout << ", " << v[1][i];
  }
  cout << ".\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  cout << v[2][0];
  for (int i = 1; i < v[2].size(); i++) {
    cout << ", " << v[2][i];
  }
  cout << ".\n";
  return 0;
}
