import java.util.*;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main2 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNext()) {
String string = in.nextLine();
char[] charArray = string.toCharArray();
// 最大数字串的长度
int maxCount = 0;
ArrayList<Integer> indexList = new ArrayList<>();
// 遍历
for (int i = 0; i < charArray.length; i++) {
// 是数字
if (Character.isDigit(charArray[i])) {
int count = 1;
// 开始位置为数字的索引
int startIndex = i;
// 看接下来的是否为数字
for (int j = i + 1; j < charArray.length; j++) {
// 判断是否为数字
if (Character.isDigit(charArray[j])) {
count++;
// 不是数字,或者最后一个是数字这种情况跳出循环
} else {
// 从下个位置开始检查,当前j变量对应的为非数字
i = j;
break;
}
}
// 如果和之前数字串长度一样,添加开始索引
if (count == maxCount) {
indexList.add(startIndex);
} else if (count > maxCount) {
maxCount = count;
// 有更大的数字串,清空之前的
indexList.clear();
indexList.add(startIndex);
}
}
}
StringBuilder builder = new StringBuilder();
for (Integer index : indexList) {
builder.append(string, index, index + maxCount);
}
builder.append(",").append(maxCount);
System.out.println(builder);
}
}
}