class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: E = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: A = None
        self.y: D = None
        self.z: A = None
        self.txt = txt

i = A("i")
l = B("l")
e = C("e")
c = D("c")
h = E("h")
k = F("k")

i.s = h
i.y = h
i.w = e
i.q = l
l.o = c
l.t = c
l.v = h
e.v = l
e.s = i
c.z = e
h.v = k
h.s = i
h.u = c
k.p = h
k.s = i
k.z = i
k.y = c
assert k.z.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: E = None
        self.w: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: A = None
        self.y: D = None
        self.z: A = None
        self.txt = txt

i = A("i")
l = B("l")
e = C("e")
c = D("c")
h = E("h")
k = F("k")

i.s = h
i.y = h
i.w = e
i.q = l
l.o = c
l.t = c
l.v = h
e.v = l
e.s = i
c.z = e
h.v = k
h.s = i
h.u = c
k.p = h
k.s = i
k.z = i
k.y = c
assert k.z.q.v.txt == "h"