#include <bits/stdc++.h>
using namespace std;
int n, k;
pair<int, string> s1[110];
pair<int, string> s2[110];
pair<int, string> s3[110];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int k;
    scanf("%d", &k);
    string t;
    cin >> t;
    s1[i].second = t;
    s2[i].second = t;
    s3[i].second = t;
    for (int j = 1; j <= k; j++) {
      int a, b, c;
      scanf("%d-%d-%d", &a, &b, &c);
      if (a == b && a == c && a % 10 == a / 10) {
        s1[i].first++;
        continue;
      }
      if (a / 10 > a % 10 && a % 10 > b / 10 && b / 10 > b % 10 &&
          b % 10 > c / 10 && c / 10 > c % 10) {
        s2[i].first++;
        continue;
      }
      s3[i].first++;
    }
  }
  printf("If you want to call a taxi, you should call: ");
  int mx = -1;
  for (int i = 1; i <= n; i++)
    if (s1[i].first > mx) mx = s1[i].first;
  bool fl = 0;
  for (int i = 1; i <= n; i++) {
    if (s1[i].first == mx)
      if (fl == 0) {
        cout << s1[i].second;
        fl = 1;
      } else {
        cout << ", " << s1[i].second;
      }
  }
  cout << "." << endl;
  mx = -1;
  printf("If you want to order a pizza, you should call: ");
  for (int i = 1; i <= n; i++)
    if (s2[i].first > mx) mx = s2[i].first;
  fl = 0;
  for (int i = 1; i <= n; i++) {
    if (s2[i].first == mx)
      if (fl == 0) {
        cout << s2[i].second;
        fl = 1;
      } else {
        cout << ", " << s2[i].second;
      }
  }
  mx = -1;
  cout << "." << endl;
  for (int i = 1; i <= n; i++)
    if (s3[i].first > mx) mx = s3[i].first;
  fl = 0;
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: ");
  for (int i = 1; i <= n; i++) {
    if (s3[i].first == mx)
      if (fl == 0) {
        cout << s3[i].second;
        fl = 1;
      } else {
        cout << ", " << s3[i].second;
      }
  }
  cout << "." << endl;
}
