private String getWordFromShifted(String shiftedWord) {
        String result = shiftedWord;
        if (result.indexOf('$') == 0 ) {
            return result.substring(1);
        } else if (result.indexOf('$') == result.length()-1 ) {
            return result.substring(0, result.length()-1);
        } else {
            int i = 0;
            while (result.indexOf('$') != 0) {
                result = result.substring(i)+result.substring(0, i);
                i++;
            }
        }
        return result.substring(1, result.length());
    }