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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: G = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.q: H = None
        self.s: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.w: B = None
        self.o: F = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.z: H = None
        self.v: F = None
        self.s: C = None
        self.r: B = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

i = A("i")
b = B("b")
c = C("c")
j = D("j")
m = E("m")
a = F("a")
d = G("d")
k = H("k")

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: G = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.q: H = None
        self.s: G = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.w: B = None
        self.o: F = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.z: H = None
        self.v: F = None
        self.s: C = None
        self.r: B = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

i = A("i")
b = B("b")
c = C("c")
j = D("j")
m = E("m")
a = F("a")
d = G("d")
k = H("k")

i.u = j
i.o = j
i.t = j
i.z = b
i.v = d
i.q = d
i.r = a
i.p = k
b.p = j
b.o = d
b.r = m
c.p = d
c.q = d
c.x = m
c.o = m
j.w = d
j.s = d
j.x = a
j.r = a
j.q = k
m.z = d
m.p = d
m.u = b
m.w = b
m.o = a
m.v = c
a.y = i
a.r = i
a.t = j
a.x = d
a.p = c
a.s = b
a.z = m
d.o = c
d.s = c
d.q = b
d.r = b
d.z = k
d.v = a
d.w = a
d.x = j
k.s = j
assert i.z.p.x.x.o.p.z.s.txt == "j"