text: dictionary_days = dict()                       # Initializes the dictionary
  fname = input('Enter a file name: ')
  try:
      fhand = open(fname)
  except FileNotFoundError:
      print('File cannot be opened:', fname)
      exit()
  
  for line in fhand:
      words = line.split()
      if len(words) < 3 or words[0] != 'From':
          continue
      else:
          if words[2] not in dictionary_days:
              dictionary_days[words[2]] = 1       # First entry
          else:
              dictionary_days[words[2]] += 1      # Additional counts
  
  print(dictionary_days)
  