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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.r: A = None
        self.y: B = None
        self.o: B = None
        self.u: H = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.r: E = None
        self.y: B = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: A = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.r: A = None
        self.y: B = None
        self.o: B = None
        self.u: H = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.r: E = None
        self.y: B = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: A = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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