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.
N = int(input())
S = input()

max_count = 0
for i in range(0, N-1):
  X = S[0:i+1]
  Y = S[i+1:]

  X_set = set(X)
  Y_set = set(Y)
  print(X,Y,X_set)

  count = len(X_set & Y_set)
  if max_count < count:
    max_count = count

print(max_count)
N = int(input())
S = input()

max_count = 0
for i in range(0, N-1):
  X = S[0:i+1]
  Y = S[i+1:]

  X_set = set(X)
  Y_set = set(Y)

  count = len(X_set & Y_set)
  if max_count < count:
    max_count = count

print(max_count)
