class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: B = None
        self.r: E = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: B = None
        self.r: E = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

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

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