자마자
immediately after
Explanation
자마자 is a connective ending meaning as soon as. It says the second action follows the first immediately.
Say what happens immediately afterward
Remove 다 from the action verb and add 자마자: 오다 → 오자마자.
Put tense or a request on the final verb
Keep -자마자 on the first verb even when you talk about yesterday. The final verb carries the past ending.
For a request, put the request ending on the second action: