My final goal is to get country borders from OSM via Overpass API. I know my country's relation object id - http://www.openstreetmap.org/relation/59065 - and can get its details with the following query:
[out:json];
rel(59065);
out body;
The relation members list contains ways (which comprise the country border) as well as some other nodes and relations. How can I filter relation members to leave only way elements?