This is my code in this code 2 test case are pass one test case are wrong what is problem in my code if logic is wrong then give correct code

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class mappedString {
public static Set decode(String prefix, String code) {
Set set = new HashSet();
if (code.length() == 0) {
set.add(prefix);
return set;
}

	if (code.charAt(0) == '0')
		return set;

	set.addAll(decode(prefix + (char) (code.charAt(0) - '1' + 'A'),
			code.substring(1)));
	if (code.length() >= 2 && code.charAt(0) == '1') {
		set.addAll(decode(
				prefix + (char) (10 + code.charAt(1) - '1' + 'A'),
				code.substring(2)));
	}
	if (code.length() >= 2 && code.charAt(0) == '2'
			&& code.charAt(1) <= '6') {
		set.addAll(decode(
				prefix + (char) (20 + code.charAt(1) - '1' + 'A'),
				code.substring(2)));
	}
	return set;

}
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
String str1=""+n;
if(!(n<=0)) {
for(String a:decode("",str1)) {
System.out.println(a);
}
}
}

}