import java.util.Scanner;
public class EXERCISE {
public static void main(String args) {
Scanner scanner = new Scanner(System.in);
int lines = Integer.parseInt(scanner.nextLine());
String allWords = “”;
int numberSum = 0;
int wordsCounter = 0;
int numbersCounter = 0;
for (int i = 0; i < lines; i++) {
String input = scanner.nextLine();
char symbol = input.charAt(0);
if (Character.isLetter(symbol)){
allWords = allWords + input + “-”;
wordsCounter++;
}
if (Character.isDigit(symbol)){
int number = Integer.parseInt(input);
numberSum = numberSum + number;
numbersCounter++;
}
}
if (wordsCounter > 0){
System.out.println(allWords.substring(0,allWords.length() - 1));
}else{
System.out.println("no words");
}
if (numberSum > 1) {
System.out.println(numberSum);
}else{
System.out.println("0");
}
}
}