#include <bits/stdc++.h>
using namespace std;
bool Taxi(int n) {
  int t, x;
  t = n % 10;
  n /= 10;
  for (int i = 0; i < 5; i++) {
    x = n % 10;
    n /= 10;
    if (x != t) {
      return false;
    }
  }
  return true;
}
bool Pizza(int n) {
  int t, x;
  t = n % 10;
  n /= 10;
  for (int i = 0; i < 5; i++) {
    x = n % 10;
    n /= 10;
    if (x <= t) {
      return false;
    }
    t = x;
  }
  return true;
}
int main() {
  int n;
  vector<int> ph[110];
  vector<int> so[3];
  string name[110];
  int sol[3];
  int soli[110][3];
  sol[0] = sol[1] = sol[2] = 0;
  cin >> n;
  for (int i = 0, t; i < n; i++) {
    cin >> t;
    cin >> name[i];
    for (int j = 0, x, temp; j < t; j++) {
      temp = 0;
      string s;
      cin >> s;
      temp += (s[0] - 48) * 100000;
      temp += (s[1] - 48) * 10000;
      temp += (s[3] - 48) * 1000;
      temp += (s[4] - 48) * 100;
      temp += (s[6] - 48) * 10;
      temp += s[7] - 48;
      ph[i].push_back(temp);
    }
  }
  for (int i = 0, t, p, g; i < n; i++) {
    t = p = g = 0;
    for (int j = 0; j < ph[i].size(); j++) {
      bool x;
      x = false;
      if (Taxi(ph[i][j])) {
        t++;
        x = true;
      }
      if (Pizza(ph[i][j])) {
        p++;
        x = true;
      }
      if (!x) {
        g++;
      }
    }
    soli[i][0] = t;
    soli[i][1] = p;
    soli[i][2] = g;
    if (t > sol[0]) {
      sol[0] = t;
    }
    if (p > sol[1]) {
      sol[1] = p;
    }
    if (g > sol[2]) {
      sol[2] = g;
    }
  }
  for (int i = 0; i < n; i++) {
    if (soli[i][0] == sol[0]) {
      so[0].push_back(i);
    }
    if (soli[i][1] == sol[1]) {
      so[1].push_back(i);
    }
    if (soli[i][2] == sol[2]) {
      so[2].push_back(i);
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0, j = 0; i < so[0].size(); i++) {
    if (i == so[0].size() - 1) {
      cout << name[so[0][j]] << ".\n";
    } else {
      cout << name[so[0][j]] << ", ";
    }
    j++;
  }
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0, j = 0; i < so[1].size(); i++) {
    if (i == so[1].size() - 1) {
      cout << name[so[1][j]] << ".\n";
    } else {
      cout << name[so[1][j]] << ", ";
    }
    j++;
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0, j = 0; i < so[2].size(); i++) {
    if (i == so[2].size() - 1) {
      cout << name[so[2][j]] << ".\n";
    } else {
      cout << name[so[2][j]] << ", ";
    }
    j++;
  }
  return 0;
}
