/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
import java.time.format.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String input = "20121116203036Z";
		DateTimeFormatter f = DateTimeFormatter.ofPattern( "yyyyMMddHHmmssX" );
		OffsetDateTime odt = OffsetDateTime.parse( input , f );
		
		String output = odt.toLocalDateTime().toString().replace( "T" , " " );
		
		System.out.println( "input: " + input );
		System.out.println( "odt: " + odt );
		System.out.println( "output: " + output );
	}
}