Using awk it is enough to do:
awk ' { print NR". " $1 } ' < file.txt
$1 is the string of text in the input, and NR an internal awk variable that tracks the current line number (e.g. Number of Records).
8 Powerful Awk Built-in Variables – FS, OFS, RS, ORS, NR, NF, FILENAME, FNR