<jupyter_start><jupyter_text>2021년 7월 18일 일요일 BaekJoon - 끝말잇기 (Python) 문제 : https://www.acmicpc.net/problem/20528 블로그 : https://somjang.tistory.com/entry/BaekJoon-20528%EB%B2%88-%EB%81%9D%EB%A7%90%EC%9E%87%EA%B8%B0-Python  Solution<jupyter_code>def end_to_end(num, string):
    is_end_to_end = 1
    if num > 0:
        split_str = string.split()
    
        compare_word = split_str[0][-1]
    
        for i in range(1, num):
            if split_str[i][0] != compare_word:
                is_end_to_end = 0
                break
            compare_word = split_str[i][-1]
        
    return is_end_to_end

if __name__ == "__main__":
    input_num = int(input())
    string = input()
    print(end_to_end(input_num, string))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13175230566534915, 'fraction_numerical': 0.05138339920948617, 'mean_word_length': 2.7254901960784315, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '404597', 'license': 'MIT', 'n_tokens_mistral': 339, 'n_tokens_neox': 325, 'n_words': 47, 'path': 'DAY 401 ~ 500/DAY428_[BaekJoon] 끝말잇기 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '759'}