output_description: Print the largest possible number of different letters contained in both X and
  Y.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      S
attempt: ***
  「文字列」S を「文字列」X と 「文字列」Y に分割、X と Y 両方に含む文字種類数最大化
  
  「文字列」S を 各位置 で 分割して、「集合」X と 「集合」Y に格納する。
  「集合」X と 「集合」Y の 論理積(AND) の 要素数 を 最大化することで求めることができる。
  「集合」X と 「集合」Y の 論理積(AND) は X & Y で求めることができる。
  ***
  
  N = int(input())
  S = input()
  
  answer = 0
  for L in range(N):
    left = S[:L]
    right = S[L:]
    both = set(left) & set(right)
    answer = max(answer, len(both))
  
  print(answer)
problem_description: Statement
  
  You are given a string S of length N consisting of lowercase English letters.
  We will cut this string at one position into two strings X and Y. Here, we
  would like to maximize the number of different letters contained in both X and
  Y. Find the largest possible number of different letters contained in both X
  and Y when we cut the string at the optimal position.
samples: [{"input": "6\n    aabbca", "output": "2\n    \n\nIf we cut the string between the third and fourth letters into X = `aab` and Y\n= `bca`, the letters contained in both X and Y are `a` and `b`. There will\nnever be three or more different letters contained in both X and Y, so the\nanswer is 2.\n\n* * *"}, {"input": "10\n    aaaaaaaaaa", "output": "1\n    \n\nHowever we divide S, only `a` will be contained in both X and Y.\n\n* * *"}, {"input": "45\n    tgxgdqkyjzhyputjjtllptdfxocrylqfqjynmfbfucbir", "output": "9"}]