package main import ( "fmt" "sort" ) func sum[T int | float64](nums []T) T { var sum T for _, n := range nums { sum += n } return sum } func reverse(s string) string { var r []rune = []rune(s) for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { r[i], r[j] = r[j], r[i] } return string(r) } func main() { var N int fmt.Scan(&N) var S []string = make([]string, N) for i := 0; i < N; i++ { var t string fmt.Scan(&t) S[i] = t } encount_str := make(map[string]int) for _, v := range S { for i := 0; i < 26; i++ { s := v + string(rune('a' + i)) r := []rune(s) sort.Slice(r, func(i, j int) bool { return r[i] < r[j] }) s = string(r) encount_str[s]++ } } for k, v := range encount_str { if v == 1 { fmt.Println(k) return } } fmt.Println(-1) }