#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << endl;
  err(++it, args...);
}
bool cmp(pair<long long, long long> p1, pair<long long, long long> p2) {
  return p1.first > p2.first;
}
bool istaxi(string code) {
  string temp;
  for (long long i = 0; i < 8; i++)
    if (code[i] != '-') temp.push_back(code[i]);
  for (long long i = 0; i < 5; i++) {
    if (temp[i] != temp[i + 1]) return false;
  }
  return true;
}
bool isPizza(string code) {
  string temp;
  for (long long i = 0; i < 8; i++)
    if (code[i] != '-') temp.push_back(code[i]);
  for (long long i = 0; i < 5; i++) {
    if (temp[i] <= temp[i + 1]) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    string frnds[n];
    long long taxi[n], pizza[n], girls[n], i = 0;
    while (i < n) {
      long long num, taxi_ = 0, pizza_ = 0, girls_ = 0;
      cin >> num;
      string name;
      cin >> name;
      while (num--) {
        string code;
        cin >> code;
        if (istaxi(code))
          taxi_++;
        else if (isPizza(code))
          pizza_++;
        else
          girls_++;
      }
      frnds[i] = name;
      taxi[i] = taxi_;
      pizza[i] = pizza_;
      girls[i] = girls_;
      i++;
    }
    long long max_taxi = *max_element(taxi, taxi + n);
    long long max_pizza = *max_element(pizza, pizza + n);
    long long max_girl = *max_element(girls, girls + n);
    long long flag = 0;
    cout << "If you want to call a taxi, you should call: ";
    for (long long i = 0; i < n; i++) {
      if (taxi[i] == max_taxi) {
        if (!flag) {
          cout << frnds[i];
          flag = 1;
        } else
          cout << ", " << frnds[i];
      }
    }
    cout << ".\n";
    cout << "If you want to order a pizza, you should call: ";
    flag = 0;
    for (long long i = 0; i < n; i++) {
      if (pizza[i] == max_pizza) {
        if (!flag) {
          cout << frnds[i];
          flag = 1;
        } else
          cout << ", " << frnds[i];
      }
    }
    cout << ".\n";
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call: ";
    flag = 0;
    for (long long i = 0; i < n; i++) {
      if (girls[i] == max_girl) {
        if (!flag) {
          cout << frnds[i];
          flag = 1;
        } else
          cout << ", " << frnds[i];
      }
    }
    cout << ".\n";
  }
}
