public String applyDecoration(String name, String[] commands,
			String[] decorations) {
		String string = new String(name);
		int i = 0;
		for (String command : commands) {
			if (command.equals("surround")) {
				string = decorations[i] + string + reverse(decorations[i]);
			} else if (command.equals("append")) {
				string += decorations[i];
			} else {
				string = decorations[i] + string;
			}
			i++;
		}
		return string;

	}