/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
//import java.util.regex.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Scanner myObj
= new Scanner
(System.
in); // Create a Scanner object
//stackoverflow/questions/2296685/how-to-read-input-with-multiple-lines-in-java
//stackoverflow/questions/56887493/how-to-take-multi-line-input-in-java search:HashmatWarrior
while(myObj.hasNext()) // see if there's more
{
String schedule
= myObj.
nextLine(); // Read user input (from w3schools/java/java_user_input.asp)
//stackoverflow/questions/10004066/java-splitting-an-input-file-by-colons
String schedParts
[] = schedule.
split("\t");
if(schedParts.length>1)
{
String workDate
=schedParts
[1]; System.
out.
print(workDay
+" "+workDate
+", ");
if(schedParts.length>2)
{
String workTime
=schedParts
[2]; String workLength
=schedParts
[3];
//w3 schools
String matchMe
="(pm)|( O)|( )"; Pattern pattern = Pattern.compile(matchMe);
Matcher matcher = pattern.matcher(workTime);
workTime = matcher.replaceAll("");
boolean matchFound = matcher.find();
System.
out.
print(workTime
+", "); }
}
else if(schedParts.length==1)
{
}
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7Ci8vaW1wb3J0IGphdmEudXRpbC5yZWdleC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lk1hdGNoZXI7IAppbXBvcnQgamF2YS51dGlsLnJlZ2V4LlBhdHRlcm47CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLk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