String decode(String cipherText, int shift) throws Exception {
		if(cipherText == null || cipherText == "" || cipherText.length() > 50) {
			throw new Exception("cipherText's length must between 0 and 50.");
		}
		
		if(p.matcher(cipherText).matches()) {
			throw new Exception("cipherText must all in UPPERCASE.");
		}
		
		if(shift < 0 || shift > 25) {
			throw new Exception("shift must between 0 and 25.");
		}
		int len = cipherText.length(), 
			offset = 0,
			i = 0;
		String result = "";
		for(; i < len; i++) {
			offset = cipherText.charAt(i) - baseOffset - shift;
			if(offset < 0) {
				offset += 26;
			}
			result += alphabet[offset];
		}
		return result;
	}