class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.v: B = None
        self.y: C = None
        self.p: E = None
        self.r: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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