class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: C = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.u: A = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: C = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.u: A = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.z: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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