Congress and President have, as I understand it, a mutual veto - but in the case where both are controlled by the same party, they tend to defer to the party organisation, which in turn defers to the President. Where they don't, you get shutdowns.
The President is generally immune to congress until they do something that gets enough congressional support for impeachment. This has proven extremely hard to do so far. The President also gets significant say over any issue that doesn't strongly unify congress.
Thus, for an issue that is popular in congress and unpopular with the President, but not popular enough in congress to override a veto, the hierarchy does President > Congress (a > b means a is above b). SCOTUS almost never gets involved when it comes to passing laws.
When it comes to an issue that is popular enough congress is willing to override a veto and which is popular enough with voters that congress going against the President on it isn't a threat, then congress > President.
I don't think anyone is claiming there is a simple hierarchy that consistently applies regardless of scenario. Even in a classical monarchy the hierarchy can shift for extreme enough scenarios.
There are likely shadow organizations in the Congress and White House with their own (unpublished) hierarchy, but probably not in the SCOTUS due to its size and the implicit potency inherent in being a Justice.
When your group grows beyond 9 people, that gets harder.
"The Brethren: Inside the Supreme Court" by Woodward and Armstrong looked (amongst other things) at why Nixon's new Chief Justice Warren Burger seemed unable to push the court in a more consistently conservative direction despite more conservative membership. Part of the conclusion was that he just wasn't that great at playing the internal political games required to stay in control.
Incidentally, the main source for that book was eventually revealed as one of the other Justices, Potter Stewart. It's a fascinating read.