class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.z: E = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.u: E = None
        self.q: A = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: B = None
        self.y: C = None
        self.u: H = None
        self.v: H = None
        self.t: A = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.r: D = None
        self.p: D = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.u: E = None
        self.q: A = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: B = None
        self.y: C = None
        self.u: H = None
        self.v: H = None
        self.t: A = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.r: D = None
        self.p: D = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.y: A = None
        self.o: A = None
        self.txt = txt

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

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