#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <math.h>
#include <stdint.h>

/*
 *  Author: Isaac Traxler
 *    Date: ?
 * Purpose: Show a possible solution
 * Problem: ACM 2012 Pratice Contest Problem
 */

int numberOfTimes;
char car[3];
char name[99];

void init()
 { /* FUNCTION init */
    scanf("%d ", &numberOfTimes);
 } /* FUNCTION init */

void getInput()
 { /* FUNCTION getInput */
    scanf("%s ", car);
    scanf("%[^\n]", name);
 } /* FUNCTION getInput */

void process()
 { /* FUNCTION process */
    printf("%s drives car number %s\n", name, car);
 } /* FUNCTION process */

int main ()
 { /* main */
    int i;

    init();
    for (i=0; i<numberOfTimes; i++)
     { /* while */
        getInput();
        process();
     } /* while */

    return EXIT_SUCCESS;
 } /* main */