#include <bits/stdc++.h>
using namespace std;
bool is_identical(string phone) {
  int cnt = 0;
  for (int i = 0, j = 1; j < phone.size(), i < phone.size(); j += 3, i += 3) {
    if (phone[i] == phone[j]) cnt++;
  }
  for (int i = 1, j = 3; j < phone.size(), i < phone.size(); j += 3, i += 3) {
    if (phone[i] == phone[j]) cnt++;
  }
  if (cnt == 5) return 1;
  return 0;
}
bool is_decreasing(string phone) {
  string code;
  int cnt = 0;
  for (int i = 0; i < phone.length(); i++) {
    if (isdigit(phone[i])) {
      code.push_back(phone[i]);
    }
  }
  for (int i = 0; i < code.length() - 1; i++) {
    if (code[i] > code[i + 1]) cnt++;
  }
  if (cnt == 5) return 1;
  return 0;
}
struct doo {
  int a, b, c;
};
int main() {
  int t;
  cin >> t;
  vector<string> identity(t);
  doo little[t];
  vector<int> call[3];
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    cin >> identity[i];
    string phone_no[n];
    for (int k = 0; k < n; k++) {
      cin >> phone_no[k];
    }
    int a = 0, b = 0, c = 0;
    for (int k = 0; k < n; k++) {
      if (is_identical(phone_no[k])) {
        a++;
      } else if (is_decreasing(phone_no[k])) {
        b++;
      } else
        c++;
    }
    little[i].a = a;
    little[i].b = b;
    little[i].c = c;
  }
  int maxx1 = 0;
  int maxx2 = 0;
  int maxx3 = 0;
  int ind1, ind2, ind3;
  for (int j = 0; j < t; j++) {
    if (little[j].a > maxx1) {
      maxx1 = little[j].a;
      ind1 = j;
    }
    if (little[j].b > maxx2) {
      maxx2 = little[j].b;
      ind2 = j;
    }
    if (little[j].c > maxx3) {
      maxx3 = little[j].c;
      ind3 = j;
    }
  }
  for (int j = 0; j < t; j++) {
    if (little[j].a == maxx1) {
      call[0].push_back(j);
    }
    if (little[j].b == maxx2) {
      call[1].push_back(j);
    }
    if (little[j].c == maxx3) {
      call[2].push_back(j);
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int j = 0; j < call[0].size(); j++) {
    cout << identity[call[0][j]];
    if (j != call[0].size() - 1)
      cout << ", ";
    else
      cout << ".";
  }
  cout << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int j = 0; j < call[1].size(); j++) {
    cout << identity[call[1][j]];
    if (j != call[1].size() - 1)
      cout << ", ";
    else
      cout << ".";
  }
  cout << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int j = 0; j < call[2].size(); j++) {
    cout << identity[call[2][j]];
    if (j != call[2].size() - 1)
      cout << ", ";
    else
      cout << ".";
  }
  cout << endl;
}
