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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.p: F = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: C = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.p: F = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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