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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

e = A("e")
g = B("g")
i = C("i")
m = D("m")
j = E("j")
d = F("d")
n = G("n")
h = B("h")
k = G("k")
c = B("c")

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

e = A("e")
g = B("g")
i = C("i")
m = D("m")
j = E("j")
d = F("d")
n = G("n")
h = B("h")
k = G("k")
c = B("c")

e.u = i
e.x = m
e.y = n
e.w = c
e.r = h
g.z = j
g.x = e
i.q = d
i.p = d
i.y = j
i.o = m
m.s = j
j.v = m
j.z = m
j.o = e
j.s = e
j.p = n
d.u = m
d.o = m
n.o = m
n.v = i
n.z = i
n.y = e
n.s = j
n.p = j
n.r = g
h.z = j
h.x = e
k.o = m
k.v = i
k.z = i
k.y = e
k.s = j
k.p = j
k.r = g
c.z = j
c.x = e
assert k.v.y.z.txt == "m"