#include <bits/stdc++.h>
using namespace std;
string s[101];
int ans[101][3];
bool taxi(string s) {
  int a = s[0];
  for (int i = 0; i < s.length(); i += 3)
    if (s[i] != a || s[i + 1] != a) return false;
  return true;
}
bool pizza(string s) {
  for (int i = 0; i < s.length(); i += 3)
    if (s[i] <= s[i + 1] || (i > 0 && s[i] >= s[i - 2])) return false;
  return true;
}
int main() {
  int n;
  cin >> n;
  int max0 = 0, max1 = 0, max2 = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a >> s[i];
    for (int j = 0; j < a; j++) {
      string s1;
      cin >> s1;
      if (taxi(s1))
        ans[i][0]++;
      else if (pizza(s1))
        ans[i][1]++;
      else
        ans[i][2]++;
    }
    max0 = max(max0, ans[i][0]);
    max1 = max(max1, ans[i][1]);
    max2 = max(max2, ans[i][2]);
  }
  cout << "If you want to call a taxi, you should call: ";
  int t0 = 0;
  for (int i = 0; i < n; i++)
    if (ans[i][0] == max0) t0++;
  for (int i = 0; i < n; i++)
    if (ans[i][0] == max0) {
      cout << s[i];
      t0--;
      if (t0 == 0)
        cout << '.' << endl;
      else
        cout << ", ";
    }
  cout << "If you want to order a pizza, you should call: ";
  int t1 = 0;
  for (int i = 0; i < n; i++)
    if (ans[i][1] == max1) t1++;
  for (int i = 0; i < n; i++)
    if (ans[i][1] == max1) {
      cout << s[i];
      t1--;
      if (t1 == 0)
        cout << '.' << endl;
      else
        cout << ", ";
    }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  int t2 = 0;
  for (int i = 0; i < n; i++)
    if (ans[i][2] == max2) t2++;
  for (int i = 0; i < n; i++)
    if (ans[i][2] == max2) {
      cout << s[i];
      t2--;
      if (t2 == 0)
        cout << '.' << endl;
      else
        cout << ", ";
    }
  return 0;
}
