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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: E = None
        self.p: A = None
        self.z: G = None
        self.q: G = None
        self.v: D = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.x: E = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: E = None
        self.p: A = None
        self.z: G = None
        self.q: G = None
        self.v: D = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.x: E = None
        self.r: E = None
        self.txt = txt

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

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