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

import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

/* 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 date = "2018-09-14T13:05:21.3Z";
		    DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
		    SimpleDateFormat sdfDestination = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		    try {
		        Date parsedDate = formatter.parse(date);
		        String destDate = sdfDestination.format(parsedDate);
		        System.out.print(destDate);
		    } catch (java.text.ParseException parseException) {
		        System.out.println("Parse Exception occured while converting publication time to date "
		                + "format 'yyyy-MM-dd HH:mm:ss'");
		    }
	}
}