select case when t1.a is null then t2.a else t1.a end as a,
t1.b,t2.c
from
(select *,ROW_NUMBER() over(partition by a order by a) as rowid from a1) t1
full join
(select *,ROW_NUMBER() over(partition by a order by a) as rowid from a3) t2
on t1.a=t2.a and t1.rowid = t2.rowid