class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: B = None
        self.p: H = None
        self.q: C = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.v: D = None
        self.y: G = None
        self.w: G = None
        self.s: F = None
        self.t: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.w: A = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

k = A("k")
h = B("h")
b = C("b")
e = D("e")
j = E("j")
l = F("l")
d = G("d")
g = H("g")
f = E("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.v: D = None
        self.y: G = None
        self.w: G = None
        self.s: F = None
        self.t: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.w: A = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

k = A("k")
h = B("h")
b = C("b")
e = D("e")
j = E("j")
l = F("l")
d = G("d")
g = H("g")
f = E("f")

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