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