class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.x: D = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: B = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

f.t = a
f.p = a
f.q = c
f.x = c
e.w = m
e.v = a
e.x = a
a.v = b
a.t = b
a.s = e
c.q = a
c.r = m
c.s = e
c.p = e
c.o = e
c.v = j
c.u = f
i.z = e
i.r = e
i.u = b
i.o = b
i.w = b
i.p = c
i.x = j
j.x = i
j.p = m
j.w = c
b.r = m
b.t = m
b.q = m
b.y = a
b.w = f
b.z = e
b.v = c
b.s = c
m.z = j
assert j.p.z.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.x: D = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: B = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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