package main import ( "bufio" "fmt" "os" ) func main() { S := nextLine() fmt.Println(woosarCipher(S)) } func woosarCipher(plain string) string { cipher := make([]rune, len(plain)) for i, c := range plain { cipher[i] = rotate(c, i+1) } return string(cipher) } func rotate(c rune, n int) rune { ret := c - rune(n%26) if ret < 'A' { return ret + 26 } else { return ret } } var sc = bufio.NewScanner(os.Stdin) func nextLine() string { sc.Split(bufio.ScanLines) sc.Scan() if nil != sc.Err() { panic(sc.Err()) } return sc.Text() }