<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def merge_dictionaries(a, b):
 """Merge two dictionaries; duplicate keys get value from b."""

  res = {}
  for k in a:
    res[k] = a[k]
  for k in b:
    res[k] = b[k]
  return res