#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, z = 0, v = 0;
  cin >> t;
  bool q = 0;
  int maxt = 0, maxg = 0, maxp = 0;
  string Taxi, Pizza, Girls;
  string Taxi1, Pizza1, Girls1;
  for (int y = 0; y < t; y++) {
    int taxi = 0, girls = 0, pizza = 0;
    int num;
    string s;
    cin >> num >> s;
    if (num == 0) {
      v++;
      if (y == 0) {
        Taxi1 = s;
        Pizza1 = s;
        Girls1 = s;
      } else {
        Taxi1 += ", " + s;
        Pizza1 += ", " + s;
        Girls1 += ", " + s;
      }
    }
    for (int i = 0; i < num; i++) {
      z++;
      string vol;
      cin >> vol;
      int* arr = new int[6];
      int j = 0;
      for (int m = 0; m < 2; m++) {
        arr[j] = vol[m] - 48;
        j++;
      }
      for (int m = 3; m < 5; m++) {
        arr[j] = vol[m] - 48;
        j++;
      }
      for (int m = 6; m < 8; m++) {
        arr[j] = vol[m] - 48;
        j++;
      }
      int check = arr[0];
      bool k = 0;
      for (int m = 0; m < 6; m++) {
        if (arr[m] == check) {
          k = 1;
        } else {
          k = 0;
          break;
        }
      }
      if (k == 1) {
        taxi++;
        if (y == 0) {
          maxt++;
        }
      }
      bool l = 0;
      for (int m = 0; m < 6; m++) {
        if (arr[m] > arr[m + 1]) {
          l = 1;
        } else if (m == 5) {
          break;
        } else {
          l = 0;
          break;
        }
      }
      if (l == 1) {
        pizza++;
        if (y == 0) {
          maxp++;
        }
      }
      if (k == 0 && l == 0) {
        girls++;
        if (y == 0) {
          maxg++;
        }
      }
    }
    if (q == 0) {
      q = 1;
      if (taxi == maxt) {
        maxt = taxi;
        Taxi = s;
      }
      if (girls == maxg) {
        maxg = girls;
        Girls = s;
      }
      if (pizza == maxp) {
        maxp = pizza;
        Pizza = s;
      }
    } else if (q == 1) {
      if (taxi == maxt) {
        maxt = taxi;
        Taxi += ", " + s;
      }
      if (girls == maxg) {
        maxg = girls;
        Girls += ", " + s;
      }
      if (pizza == maxp) {
        maxp = pizza;
        Pizza += ", " + s;
      }
    }
    if (taxi > maxt) {
      maxt = taxi;
      Taxi = s;
    }
    if (girls > maxg) {
      maxg = girls;
      Girls = s;
    }
    if (pizza > maxp) {
      maxp = pizza;
      Pizza = s;
    }
  }
  if (v == t) {
    cout << "If you want to call a taxi, you should call: " << Taxi1 << '.'
         << endl;
    cout << "If you want to order a pizza, you should call: " << Pizza1 << '.'
         << endl;
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call: "
         << Girls1 << '.' << endl;
    exit(0);
  }
  cout << "If you want to call a taxi, you should call: " << Taxi << '.'
       << endl;
  cout << "If you want to order a pizza, you should call: " << Pizza << '.'
       << endl;
  cout << "If you want to go to a cafe with a wonderful girl, you should call: "
       << Girls << '.' << endl;
}
