← Home
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

	score1 := 0
	score2 := 0
	score3 := 0

	words1 := map[string]int{
		"team": 1, "game": 1, "match": 1, "player": 1, "season": 1, "win": 1, "won": 1, "cup": 1, "club": 1, "champion": 1, "league": 1, "coach": 1, "tournament": 1, "goal": 1, "football": 1, "baseball": 1, "basketball": 1,
		"film": 1, "movie": 1, "music": 1, "band": 1, "album": 1, "song": 1, "director": 1, "actor": 1, "star": 1, "art": 1, "festival": 1, "award": 1,
		"book": 1, "author": 1, "published": 1, "novel": 1, "writer": 1, "story": 1,
	}

	words2 := map[string]int{
		"space": 1, "science": 1, "research": 1, "earth": 1, "system": 1, "university": 1, "study": 1, "scientists": 1, "solar": 1, "planet": 1, "mission": 1, "orbit": 1, "moon": 1,
		"computer": 1, "software": 1, "data": 1, "internet": 1, "network": 1, "web": 1, "technology": 1, "users": 1, "microsoft": 1, "apple": 1, "windows": 1,
		"government": 1, "president": 1, "state": 1, "police": 1, "court": 1, "law": 1, "party": 1, "country": 1, "war": 1, "election": 1, "minister": 1, "military": 1,
	}

	words3 := map[string]int{
		"trade": 1, "market": 1, "price": 1, "company": 1, "money": 1, "bank": 1, "percent": 1, "economy": 1, "business": 1, "financial": 1, "stock": 1, "share": 1, "sale": 1, "cost": 1, "invest": 1, "growth": 1, "industry": 1, "profit": 1, "production": 1, "oil": 1, "quarter": 1, "tax": 1, "economic": 1, "investment": 1, "export": 1, "import": 1, "trading": 1, "sales": 1, "revenue": 1, "prices": 1, "markets": 1, "shares": 1, "investors": 1, "companies": 1, "banks": 1, "finance": 1, "rates": 1, "inflation": 1, "currency": 1, "dollar": 1, "euro": 1, "fund": 1, "capital": 1,
	}

	for scanner.Scan() {
		word := strings.ToLower(scanner.Text())
		word = strings.Trim(word, ".,!?:;\"'()[]{}")

		if words1[word] > 0 {
			score1++
		}
		if words2[word] > 0 {
			score2++
		}
		if words3[word] > 0 {
			score3++
		}
	}

	if score3 > score1 && score3 > score2 {
		fmt.Println(3)
	} else if score2 > score1 && score2 >= score3 {
		fmt.Println(2)
	} else if score1 >= score2 && score1 >= score3 {
		fmt.Println(1)
	} else {
		fmt.Println(3)
	}
}