


"""simple docstring"""





import os





def     lowercase__	(  )					->     Union[str, Any]:
  lowerCAmelCase__    :    Optional[int]								=					0
  lowerCAmelCase__    :    Any								=					0
  with open(os.path.dirname(lowerCamelCase				) + "/p022_names.txt"				) as file:
    lowerCAmelCase__    :    int								=					str(file.readlines()[0]				)
    lowerCAmelCase__    :    Any								=					name.replace("\""				,	""				).split(","				)

  name.sort()
  for i in range(len(lowerCamelCase				)				):
    for j in name[i]:
      temp_sum += ord(lowerCamelCase				) - ord("A"				) + 1
    total_sum += (i + 1) * temp_sum
    lowerCAmelCase__    :    Optional[Any]								=					0
  return total_sum


if __name__ == "__main__":
   print(solution())




"""simple docstring"""





def     lowercase__	(  lowerCamelCase     :  int				)					->     int:
  if not isinstance(lowerCamelCase				,	lowerCamelCase				):
    raise TypeError("recursive_lucas_number accepts only integer arguments."				)
  if n_th_number == 0:
    return 2
  if n_th_number == 1:
    return 1

  return recursive_lucas_number(n_th_number - 1				) + recursive_lucas_number(
      n_th_number - 2				)





def     lowercase__	(  lowerCamelCase     :  int				)					->     int:
  if not isinstance(lowerCamelCase				,	lowerCamelCase				):
    raise TypeError("dynamic_lucas_number accepts only integer arguments."				)
  lowerCAmelCase__				,		lowerCAmelCase__    :    str								=					2, 1
  for _ in range(lowerCamelCase				):
    lowerCAmelCase__				,		lowerCAmelCase__    :    str								=					b, a + b
  return a


if __name__ == "__main__":
   from doctest import testmod

   testmod()
   __UpperCAmelCase    				=      int(input("Enter the number of terms in lucas series:\n").strip())
   print("Using recursive function to calculate lucas series:")
   print(" ".join(str(recursive_lucas_number(i)) for i in range(n)))
   print("\nUsing dynamic function to calculate lucas series:")
   print(" ".join(str(dynamic_lucas_number(i)) for i in range(n)))
