#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<pair<int, string>> ta;
  vector<pair<int, string>> pi;
  vector<pair<int, string>> gi;
  for (int j = 0; j < n; j++) {
    int k;
    cin >> k;
    string s1;
    cin >> s1;
    int taxi = 0, pizza = 0, girl = 0;
    for (int l = 0; l < k; l++) {
      string s2;
      cin >> s2;
      char arr[6];
      int a = 0;
      for (int i = 0; i < 8; i++) {
        if (s2[i] != '-') {
          arr[a] = s2[i];
          a++;
        }
      }
      int x = 0, y = 0;
      for (int i = 0; i < 5; i++) {
        if (arr[i] == arr[i + 1]) {
          x++;
        }
        if (arr[i] > arr[i + 1]) {
          y++;
        }
      }
      if (x == 5) {
        taxi++;
      } else if (y == 5) {
        pizza++;
      } else {
        girl++;
      }
    }
    ta.push_back({taxi, s1});
    gi.push_back({girl, s1});
    pi.push_back({pizza, s1});
  }
  string fita[n], fipi[n], figi[n];
  auto s = *max_element(ta.begin(), ta.end());
  int a = s.first;
  auto t = *max_element(pi.begin(), pi.end());
  int b = t.first;
  auto u = *max_element(gi.begin(), gi.end());
  int c = u.first;
  int p = 0, q = 0, r = 0;
  for (int i = 0; i < n; i++) {
    if (ta[i].first == a) {
      fita[p] = ta[i].second;
      p++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (pi[i].first == b) {
      fipi[q] = pi[i].second;
      q++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (gi[i].first == c) {
      figi[r] = gi[i].second;
      r++;
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < p; i++) {
    cout << fita[i];
    if (i < p - 1) {
      cout << ", ";
    }
  }
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < q; i++) {
    cout << fipi[i];
    if (i < q - 1) {
      cout << ", ";
    }
  }
  cout << "." << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < r; i++) {
    cout << figi[i];
    if (i < r - 1) {
      cout << ", ";
    }
  }
  cout << "." << endl;
  return 0;
}
