package cn.com.qmth.stmms.api.controller;

public class Test {

	public static void main(String[] args) {
		boolean convert = true;
		char[] s = "100010018072128141004".toCharArray();
		String[] str = new String[s.length];
		for(int i=0;i<str.length;i++){
			str[i] = String.valueOf(s[i]);
		}
		String[] diploma = {"D","0","1","13"};
    	String[] bachelorDegree = {"F","1","1","13"};
    	
    	if(convert){
    		if(str[Integer.parseInt(diploma[2])-1].equals(diploma[1])){
    			str[Integer.parseInt(diploma[2])-1]=diploma[0];
    		}
    		if(str[Integer.parseInt(diploma[3])-1].equals(diploma[1])){
    			str[Integer.parseInt(diploma[3])-1]=diploma[0];
    		}
    		if(str[Integer.parseInt(bachelorDegree[2])-1].equals(bachelorDegree[1])){
    			str[Integer.parseInt(bachelorDegree[2])-1]=bachelorDegree[0];
    		}
    		if(str[Integer.parseInt(bachelorDegree[3])-1].equals(bachelorDegree[1])){
    			str[Integer.parseInt(bachelorDegree[3])-1]=bachelorDegree[0];
    		}
    	}else{
    		if(str[Integer.parseInt(diploma[2])-1].equals(diploma[0])){
    			str[Integer.parseInt(diploma[2])-1]=diploma[1];
    		}
    		if(str[Integer.parseInt(diploma[3])-1].equals(diploma[0])){
    			str[Integer.parseInt(diploma[3])-1]=diploma[1];
    		}
    		if(str[Integer.parseInt(bachelorDegree[2])-1].equals(bachelorDegree[0])){
    			str[Integer.parseInt(bachelorDegree[2])-1]=bachelorDegree[1];
    		}
    		if(str[Integer.parseInt(bachelorDegree[3])-1].equals(bachelorDegree[0])){
    			str[Integer.parseInt(bachelorDegree[3])-1]=bachelorDegree[1];
    		}
    	}
    	StringBuffer sb = new StringBuffer();
		for(String ss: str){
			sb.append(ss);
		}
    	System.out.println(sb.toString());

	}

}
