#include<stdio.h>
int main(){

  int i,n;

  scanf("%d", &n );

  char S[37],N[37];

  for ( i = 0 ; i < n ; i++ ){
    scanf("%c", &S[i] );
    scanf("%c", &N[i] );
  }

  printf("%c %c\n", S[0], N[0] );

  return 0;

}