
int main(void)
{
	int i = 0, j = 0, n = 0, count = 0;
	int seisu[250];
	char str[250];
	char tok[250];

	
	scanf("%d", &n);
	while (getchar() != '\n');

	fgets(str, sizeof(str), stdin);


	kuuhaku(str, &tok, seisu, n);

	

	count = swap1(seisu, count, n);


	for (i = 0; i < n; i++) {
		printf("%d ", seisu[i]);
	}

	putchar('\n');

	printf("%d", count);

	return 0;

}
