#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 5;
int n;
int a[N][4];
string name[N];
int mx[4];
string p[] = {
    "If you want to call a taxi, you should call: ",
    "If you want to order a pizza, you should call: ",
    "If you want to go to a cafe with a wonderful girl, you should call: "};
bool taxi(string s) {
  for (int i = 0; s[i]; i++)
    if (s[i] != '-' && s[i] != s[0]) return false;
  return true;
}
bool pizza(string s) {
  int last = 10;
  for (int i = 0; s[i]; i++)
    if (s[i] != '-') {
      if (int(s[i] - '0') >= last) return false;
      last = int(s[i] - '0');
    }
  return true;
}
int get(string s) { return taxi(s) ? 0 : pizza(s) ? 1 : 2; }
void solve(int testCase) {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int s;
    scanf("%d", &s);
    cin >> name[i];
    while (s--) {
      string st;
      cin >> st;
      a[i][get(st)]++;
    }
    for (int f : {0, 1, 2}) mx[f] = max(mx[f], a[i][f]);
  }
  for (int f : {0, 1, 2}) {
    printf("%s", p[f].c_str());
    vector<string> ans;
    for (int i = 0; i < n; i++) {
      if (a[i][f] == mx[f]) ans.push_back(name[i]);
    }
    for (int i = 0; i < ans.size(); i++) {
      printf("%s%s", ans[i].c_str(), i == ans.size() - 1 ? "." : ", ");
    }
    printf("\n");
  }
}
int main() {
  int t = 1;
  for (int testCase = 1; testCase <= t; testCase++) {
    solve(testCase);
  }
  return 0;
}
