class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: G = None
        self.y: D = None
        self.t: B = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: G = None
        self.o: B = None
        self.p: D = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.t: E = None
        self.p: G = None
        self.txt = txt

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

m = A("m")
h = B("h")
g = C("g")
a = D("a")
n = E("n")
i = F("i")
d = G("d")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: G = None
        self.o: B = None
        self.p: D = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.t: E = None
        self.p: G = None
        self.txt = txt

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

m = A("m")
h = B("h")
g = C("g")
a = D("a")
n = E("n")
i = F("i")
d = G("d")
l = G("l")

m.x = a
m.y = a
m.r = a
m.o = l
m.t = h
m.p = h
h.v = m
h.r = m
h.t = m
h.u = m
g.w = h
g.o = h
g.q = h
g.x = d
g.p = a
g.y = m
a.x = i
a.p = g
n.v = m
n.x = g
n.q = g
n.z = d
n.u = i
n.p = a
i.x = a
i.q = d
i.t = n
i.p = l
d.s = a
d.z = a
d.w = n
d.t = l
d.o = l
d.x = h
l.s = a
l.z = a
l.w = n
l.t = d
l.o = d
l.x = h
assert i.q.w.v.t.txt == "h"