#include <bits/stdc++.h>
using namespace std;
const int MAXF = 100 + 5;
int digits[6] = {0, 1, 3, 4, 6, 7};
bool taxi(string s) {
  for (int i = 0; i < 6; i++)
    if (s[digits[i]] != s[0]) return false;
  return true;
}
bool pizza(string s) {
  for (int i = 0; i < 5; i++)
    if (s[digits[i]] <= s[digits[i + 1]]) return false;
  return true;
}
int type(string s) {
  if (taxi(s)) return 0;
  if (pizza(s)) return 1;
  return 2;
}
string friends[MAXF];
int num[MAXF][3];
int n;
int most[3] = {-1, -1, -1};
vector<int> maxes[3];
string print[3];
int main() {
  print[0] = "If you want to call a taxi, you should call: ";
  print[1] = "If you want to order a pizza, you should call: ";
  print[2] =
      "If you want to go to a cafe with a wonderful girl, you should call: ";
  cin >> n;
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    cin >> friends[i];
    for (int j = 0; j < m; j++) {
      string temp;
      cin >> temp;
      num[i][type(temp)]++;
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 3; j++)
      if (num[i][j] > most[j]) most[j] = num[i][j];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 3; j++)
      if (num[i][j] == most[j]) maxes[j].push_back(i);
  for (int i = 0; i < 3; i++) {
    cout << print[i];
    for (int j = 0; j < (int)maxes[i].size(); j++) {
      cout << friends[maxes[i][j]];
      if (j != (int)maxes[i].size() - 1)
        cout << ", ";
      else
        cout << ".";
    }
    cout << "\n";
  }
  return 0;
}
