class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.u: D = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.u: F = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.p: G = None
        self.s: B = None
        self.w: F = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

k.o = n
k.w = a
k.u = c
k.r = c
k.q = m
i.w = c
i.v = l
n.r = i
n.v = m
n.u = l
n.o = j
n.q = c
c.p = l
c.v = l
c.t = l
j.o = c
l.p = n
m.y = c
m.q = c
m.o = j
m.t = a
m.v = i
a.u = c
a.t = k
a.z = k
a.p = m
a.r = m
a.s = i
a.w = l
h.o = c
assert k.w.u.t.p.u.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.u: D = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.u: F = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.p: G = None
        self.s: B = None
        self.w: F = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

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