Learning Greens Operators through Hierarchical Neural Networks Inspired by the Fast Multipole Method