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

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
/* 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 strs[]  = {"000001010016C02AB  111*", "000001010016C02    111H", "000001010016C      111 ", "901509010012V      154 "};
		Pattern p = Pattern.compile("(.{11})[0-9](.{5}).{5}(.*)");
		for (String s: strs) {
			StringBuffer result = new StringBuffer();
			Matcher m = p.matcher(s);
			if (m.matches()) {
	    			m.appendReplacement(result, m.group(1) + "," + m.group(2).trim()  + "," + m.group(3));
			}
			System.out.println(result.toString());
		}

	}
}