created greedy.py