#!/usr/bin/env python3

import sys
import os

with open(sys.argv[1]) as fh:
    content = fh.read().replace("{NAME}", sys.argv[2])

with open(os.path.join(sys.argv[3]), 'w', errors='replace') as fh:
    fh.write(content)
