Atomically thin nanowires convert heat to electricity more efficiently