An Information Theoretic Framework for Two-Way Relay Networks