#include <bits/stdc++.h>
using namespace std;
char tp(string s) {
  set<char> c(begin(s), end(s));
  if (c.size() == 2)
    return 't';
  else if (c.size() > 2 && c.size() < 7)
    return 'g';
  else {
    long long int prev = s[0] - '0', cur;
    for (long long int i = 1; i < 8; i++) {
      if (s[i] == '-') continue;
      cur = s[i] - '0';
      if (cur >= prev) return 'g';
      prev = cur;
    }
    return 'p';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<string> pizza, taxi, girl;
  long long int t, numt, maxp = 0, maxt = 0, maxg = 0;
  string name, num;
  cin >> t;
  while (t--) {
    long long int ta = 0, piz = 0, gi = 0;
    cin >> numt >> name;
    while (numt--) {
      cin >> num;
      if (tp(num) == 't') ta++;
      if (tp(num) == 'p') piz++;
      if (tp(num) == 'g') gi++;
    }
    if (gi == maxg) girl.push_back(name);
    if (gi > maxg) {
      maxg = gi;
      girl.clear();
      girl.push_back(name);
    }
    if (piz == maxp) pizza.push_back(name);
    if (piz > maxp) {
      maxp = piz;
      pizza.clear();
      pizza.push_back(name);
    }
    if (ta == maxt) taxi.push_back(name);
    if (ta > maxt) {
      maxt = ta;
      taxi.clear();
      taxi.push_back(name);
    }
  }
  cout << "If you want to call a taxi, you should call:";
  if (taxi.size() == 1)
    cout << ' ' << taxi.front() << '.' << '\n';
  else {
    for (long long int i = 0; i < taxi.size() - 1; i++)
      cout << ' ' << taxi[i] << ',';
    cout << ' ' << taxi.back() << '.' << '\n';
  }
  cout << "If you want to order a pizza, you should call:";
  if (pizza.size() == 1)
    cout << ' ' << pizza.front() << '.' << '\n';
  else {
    for (long long int i = 0; i < pizza.size() - 1; i++)
      cout << ' ' << pizza[i] << ',';
    cout << ' ' << pizza.back() << '.' << '\n';
  }
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  if (girl.size() == 1)
    cout << ' ' << girl.front() << '.' << '\n';
  else {
    for (long long int i = 0; i < girl.size() - 1; i++)
      cout << ' ' << girl[i] << ',';
    cout << ' ' << girl.back() << '.' << '\n';
  }
  return 0;
}
