class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: B = None
        self.t: E = None
        self.w: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: E = None
        self.q: D = None
        self.v: B = None
        self.w: F = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.p: G = None
        self.o: E = None
        self.t: H = None
        self.y: H = None
        self.x: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.t: H = None
        self.r: A = None
        self.z: A = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.txt = txt

i = A("i")
f = B("f")
l = C("l")
h = D("h")
a = E("a")
g = F("g")
c = G("c")
e = H("e")
k = E("k")
d = B("d")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: E = None
        self.q: D = None
        self.v: B = None
        self.w: F = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.p: G = None
        self.o: E = None
        self.t: H = None
        self.y: H = None
        self.x: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.t: H = None
        self.r: A = None
        self.z: A = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.txt = txt

i = A("i")
f = B("f")
l = C("l")
h = D("h")
a = E("a")
g = F("g")
c = G("c")
e = H("e")
k = E("k")
d = B("d")

i.o = l
i.z = d
i.t = a
i.w = f
i.q = k
f.t = g
f.w = g
f.x = a
f.q = h
f.v = d
f.r = l
f.y = e
l.z = e
l.t = e
l.y = e
l.x = e
l.v = i
l.u = i
l.p = c
l.o = a
h.w = c
h.u = g
h.q = f
a.p = e
g.y = h
g.s = i
g.r = i
g.z = i
g.t = e
g.v = k
g.o = k
c.v = h
c.y = i
e.s = l
e.o = c
k.p = e
d.t = g
d.w = g
d.x = k
d.q = h
d.v = f
d.r = l
d.y = e
assert k.p.o.v.txt == "h"