using System;
using System.IO;
using System.Text.RegularExpressions;
class HelloWorld {
static void Main() {
string[] data = File.ReadAllLines("identyfikator.txt");
int temp = 0;
foreach (string line in data) {
string digits = Regex.Replace(line, "^[A-Z]{3}", "");
int total = 0;
for (int i=0; i<digits.Length; i++)
total += (int)digits[i] - '0';
if (total > temp) {
Console.WriteLine("{0} {1}", total, line);
temp = total;
}
}
}
}
ACD364321
FYH766322
ERT492157
UCF086201
SER030271
TRE320041
HGJ264015
YIK288424
LOP631028
RFT075953