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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.z: E = None
        self.r: G = None
        self.u: D = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.z: E = None
        self.r: G = None
        self.u: D = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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