/* Viewing Sources */


//Nhan Le

import java.io.*;

public class ConwayApp{
	final static int size = 16;
	static PrintWriter pw;
	static{
		try{
			pw = new PrintWriter(new FileOutputStream(new File("conwayoutput.txt")));
		}
		catch(Exception e){
			e.printStackTrace();
		}
	}
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(
					new InputStreamReader(
						new FileInputStream(
							new File("conwayinput.txt"))));
		String inputline = br.readLine();
		
		
		boolean[] current = new boolean[size];
		for(int i=0; i<inputline.length(); i++)
			current[i] = (inputline.charAt(i)==('x')?true:false);
		 
		boolean[] next = new boolean[size];
		
		for(int dd=2; dd<100; dd++){
			for(int r=0; r<size; r++){
				if(r==0){
					next[0] = (current[1]);
				}
				else if(r==size-1){
					next[size-1] = (current[size-2]);	
				}
				else{
					next[r] = (current[r-1]||current[r+1]) && (current[r-1]!=current[r+1]);
				}
			}
			//copy
			for(int r=0; r<size; r++){
				current[r] = next[r];
			}
			//System.out.println(convert(next));
			if(dd>89 && dd <101){
				tee(convert(next)+"\n");
			}
		}

		pw.close();		
	}
	public static void tee(String s){
		System.out.print(s);
		pw.print(s);
	}
	public static String convert(boolean[] b){
		StringBuffer sb = new StringBuffer();
		for(int i=0; i<b.length; i++){
			sb.append((b[i]?"x":"-"));
		}
		return sb.toString();
	}
}
/* sources by Nhan Le */
/* [email protected] */
/* [email protected] */
/* [email protected] */
/* if you find the sources useful or if you want to make any modifications, just email me */
/* html generated using GNU source-highlight 1.8 =-) */