class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: E = None
        self.t: F = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: E = None
        self.t: F = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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