MOOSACO 2022 July Contest, Dirt
Problem 1. Lions
Contest may or may not have ended. We don't know.
Analysis mode
Roar! James the lion is hungry! He sees Bessie the cow and wants to eat her!
Luckily, Bessie finds out before it's too late. Bessie does some calculations and manages to retrieve a list of N ($1 \leq N \leq 22$) words that James is scared of. Each word consists of only lowercase letters. Words have a maximum length of 5. Unfortunately, Bessie has bad memory and can only remember $M$ ($0 \leq M \leq 26$) letters, so all the words she can say must only use up to $M$ total distinct letters.
Please find out the maximum amount of words Bessie can pronounce that James is scared of.
INPUT FORMAT (input arrives from stdin):
First line contains 2 numbers, $N$ and $M$.
Next $N$ lines contains the words James is scared of.
OUTPUT FORMAT (send output to stdout):
Please output the maximum amount of words that Bessie can pronounce, given the amount of letters she can pronounce.
SAMPLE INPUT:
4 7 james pee cpp usaco
SAMPLE OUTPUT:
3
In the above case, the words pee, cpp, and usaco only use the letters a, c, e, p, s, o, and u.
Problem credits: real_henry