import sys def solve(): """ Reads N and M from input and calculates M^N. """ try: line = sys.stdin.readline().split() n = int(line[0]) m = int(line[1]) # Basic constraints check (though the problem statement guarantees 1 <= N, M <= 16) # if not (1 <= n <= 16 and 1 <= m <= 16): # # Handle invalid input if needed, though problem constraints make this unlikely # # For competitive programming, usually constraints are guaranteed # pass # Calculate M raised to the power of N result = m ** n # Print the result print(result) except Exception as e: # Handle potential errors during input reading or conversion # For competitive programming, usually input format is strict # print(f"An error occurred: {e}", file=sys.stderr) pass if __name__ == "__main__": solve()