Moved greedy. Made `cout <<` overload a `friend`.