BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line = null;
while ((line = in.readLine()) != null) {
card.offer(line);
count++;
if (updateRate > 0 && count % updateRate == 0) {
System.out.println(formatSummary(count, card.cardinality()));
}