CT572

The First Lone Mark Beneath Needlepoint

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the pine barrens of Needlepoint close for winter, Ivo must finish the ribbons ledger - one figure at a time. Task: Print the first character of s that occurs exactly once. If none exists, print -1. Input format: One line with a single lowercase string s. Output format: Print a single character or -1. Constraints: 1 <= |s| <= 181; s contains lowercase English letters.

Example 1:

Input: vefwhpunideydenvtaxiiaaofosqxrzjkxyaakcatbgsslqqzyevyaaobmhsh
Output: w

Example 2:

Input: ozhiecotrbqacpzujtluemfdwgijekthkdhgbartzjfwqkwswiapomexbwrjxyvoqurqhvtjkavnkxvrhudtajleqadrrkiscmkrvdssrenfiisuhzclutcfffbirq
Output: y

Example 3:

Input: lttetqdxvxmribpsfcjghroxixpjqnbvqstknhvuwefrjtoehmuyydswwhocmyuscmphjmxhohdrkpwidshebcgapclchtrtaapmxxdpuloanujzasbsoxtmniavvlyovkntzncsnsussgngncgiuckcfbdjeolqt
Output: -1

Constraints:

1 <= |s| <= 181; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.