Simple python implement
Removed unwanted lines.