// Arup Guha
// 10/17/2014
// Solution to 1994 UCF HS Contest Problem: Backseat Driver

import java.util.*;

public class driver {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		// Go through all cases.
		while (stdin.hasNext()) {

			// Set up this case.
			int n = Integer.parseInt(stdin.nextLine());
			String msg = stdin.nextLine();
			int person = 0;
			String[] said = new String[n];
			Arrays.fill(said, "");

			// Go until no one else speaks.
			while (msg.length() > 0) {

				// Get this message and add to appropriate person.
				int endIndex = getEnd(msg);
				String spoke = (msg.substring(0,endIndex)).replaceAll("!!","!");
				said[person] = said[person] + spoke;

				// Update for next turn.
				msg = msg.substring(Math.min(msg.length(),endIndex+1));
				person = (person+1)%n;
			}

			// Print what everyone said and calculate best.
			int winner = 0, max = 0;
			for (int i=0; i<n; i++) {
				System.out.println("Person #"+(i+1)+":  "+said[i]);
				if (count(said[i], '!') > max) {
					max = count(said[i], '!');
					winner = i;
				}
			}

			// Print correct directions.
			System.out.println("Follow person #"+(winner+1)+":  "+said[winner]);
			System.out.println();
		}
	}

	// Returns index of end of the first occurrence of an odd run of !s.
	public static int getEnd(String s) {

		int i = 0;

		// Go to end.
		while (i < s.length()) {

			// Find first exclamation.
			while (i < s.length() && s.charAt(i) != '!') i++;

			// Count count this run.
			int cnt = 0;
			while (i < s.length() && s.charAt(i) == '!') {
				cnt++;
				i++;
			}

			if (cnt%2 == 1) return i-1;
		}

		// Never found one.
		return s.length();
	}

	// Returns number of times c is in s.
	public static int count(String s, char c) {
		int cnt = 0;
		for (int i=0; i<s.length(); i++)
			if (s.charAt(i) == '!')
				cnt++;
		return cnt;
	}
}