"""
Question

Given two strings (of lowercase letters), a pattern and a string. The task is to sort string according to
the order defined by pattern and return the reverse of it. It may be assumed that pattern has all characters
of the string and all characters in pattern appear only once.

Examples:

Input : pat = "asbcklfdmegnot", str = "eksge"

Output : str = "geeks" (after sorting, str becomes "skeeg" and return its reverse)

Input : pat = "mgewqnasibkldjxruohypzcftv", str = "niocgd"

Output : str = "coding"

"""