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

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

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

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

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

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

n = A("n")
j = B("j")
k = C("k")
f = D("f")
a = E("a")
l = F("l")
g = B("g")
e = E("e")

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

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

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

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

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

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

n = A("n")
j = B("j")
k = C("k")
f = D("f")
a = E("a")
l = F("l")
g = B("g")
e = E("e")

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