class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.q: G = None
        self.s: E = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: A = None
        self.s: F = None
        self.x: C = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: A = None
        self.s: F = None
        self.x: C = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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