EDIT: Sorry, thought ABC is parent of DEF, but checked again and saw you say, DEF is parent of ABC, so i changed my answer accordingly
This table structure is a bit strange, two tables would be quite enough. But never mind about it.
Hierarchical queries are executed on tables that contains reference to itself. So, what you need here is to join these tables to get a single result set and execute connect by hierarchical query on it.
Considering you are looking for a specific record's parents. Say that is agency_cd = 'ABC' this is how you are going to get it.
select agency_id, agency_cd, level from (
--Below query will join three tables to get a record and its parent id side-by-side in a row
SELECT ag.*, rlag.reln_agency_id AS parent_agency_id
FROM agy_agency ag, agy_reln rl, agy_rel_agency rlag
WHERE ag.agency_id = rl.agency_id (+)
AND rlag.agy_reln_id(+) = rl.agy_reln_id
) t
where agency_cd <> 'ABC' --discard the record you are looking for itself
connect by agency_id = prior parent_agency_id -- Connect by is executed before where clause, don't worry about where clause
start with agency_cd = 'ABC';
On the other hand. If you would like to see the whole table hieararchically. Try below query.
select agency_id, agency_cd, prior agency_id as parent_agency_id, prior agency_cd as parent_agency_cd, level from (
SELECT ag.*, rlag.reln_agency_id AS parent_agency_id
FROM agy_agency ag, agy_reln rl, agy_rel_agency rlag
WHERE ag.agency_id = rl.agency_id (+)
AND rlag.agy_reln_id(+) = rl.agy_reln_id
) t
connect by prior agency_id = parent_agency_id
start with parent_agency_id is null
Here you are, the sql fiddle for your example http://www.sqlfiddle.com/#!4/3f692/5