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

class B:
    def __init__(self, txt: str):
        self.v: C = 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.x: E = None
        self.v: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: G = None
        self.w: G = None
        self.s: E = None
        self.o: G = None
        self.t: E = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.t: B = None
        self.s: F = None
        self.z: F = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

a = A("a")
c = B("c")
h = C("h")
d = D("d")
i = E("i")
f = F("f")
g = G("g")
j = E("j")
m = G("m")

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

class B:
    def __init__(self, txt: str):
        self.v: C = 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.x: E = None
        self.v: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: G = None
        self.w: G = None
        self.s: E = None
        self.o: G = None
        self.t: E = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.t: B = None
        self.s: F = None
        self.z: F = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

a = A("a")
c = B("c")
h = C("h")
d = D("d")
i = E("i")
f = F("f")
g = G("g")
j = E("j")
m = G("m")

a.t = j
a.s = c
a.z = c
a.w = m
a.p = h
a.x = h
a.u = d
c.v = h
h.o = f
d.x = j
d.v = h
d.t = f
i.z = m
i.y = m
i.w = g
i.o = g
i.s = j
i.t = j
i.r = d
f.x = d
f.y = d
f.u = a
g.r = c
g.t = c
g.x = h
g.s = f
g.z = f
g.v = j
g.u = m
j.z = m
j.y = g
j.w = g
j.o = g
j.s = i
j.t = i
j.r = d
m.r = c
m.t = c
m.x = h
m.s = f
m.z = f
m.v = i
m.u = g
assert h.o.x.v.txt == "h"