// Write hasRepeatedWord(str): true if the same word appears twice in a row.
function hasRepeatedWord(str) {
}
// Write isDoubledString(str): true if the whole string is some sequence
// of word characters repeated exactly twice back-to-back, e.g. "abcabc".
function isDoubledString(str) {
}