{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
{-# LANGUAGE CPP               #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections     #-}

import           Control.Applicative
import           Control.Monad
import           Control.Monad.Primitive
import           Control.Monad.ST
import           Control.Monad.State.Strict
import           Data.Bool
import qualified Data.ByteString.Char8       as B
import qualified Data.ByteString.Unsafe      as B
import           Data.Char
import           Data.Function
import qualified Data.IntMap.Strict          as IM
import qualified Data.IntSet                 as IS
import           Data.List
import qualified Data.Map.Strict             as M
import           Data.Monoid
import           Data.Ord
import           Data.Primitive.MutVar
import qualified Data.Set                    as S
import           Data.Tuple
import qualified Data.Vector                 as V
import qualified Data.Vector.Generic         as G
import qualified Data.Vector.Generic.Mutable as GM
import qualified Data.Vector.Unboxed         as U
import qualified Data.Vector.Unboxed.Mutable as UM
import           Debug.Trace
import           Foreign                     hiding (void)
import           Unsafe.Coerce

import           System.IO

main :: IO ()
main = do
    n <- readLn :: IO Int
    solve n

solve :: Int -> IO ()
solve n = go [(s1, s2) | s1<-["#", "."], s2 <- ["#", "."]]
  where
    go ss = do
        ress <- queries ss
        if elem Nothing ress then return ()
        else do
            let ts = map snd . filter fst $ zip [b | Just b<-ress] ss
            go [(take n $ x1++x2, take n $ y1++y2)|(x1,y1)<-ts,(x2,y2)<-ts]



type Request = (String, String)
type Response = Maybe Bool

queries :: [Request] -> IO [Response]
queries qs = go qs
  where
    go (q:qs) = do
        res <- query q
        case res of
            Just b -> (Just b:) <$> go qs
            Nothing -> return [Nothing]
    go [] = return []


query :: Request -> IO Response
query (s1, s2) = do
    putStrLn s1
    putStrLn s2
    hFlush stdout
    res <- getLine
    case res of
        "T" -> return $ Just True
        "F" -> return $ Just False
        "end" -> return $ Nothing