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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.s: B = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.o: F = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.y: I = None
        self.v: E = None
        self.p: D = None
        self.t: B = None
        self.x: E = None
        self.q: D = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.v: C = None
        self.q: F = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: C = None
        self.txt = txt

h = A("h")
a = B("a")
c = C("c")
e = D("e")
k = E("k")
j = F("j")
l = G("l")
g = H("g")
d = I("d")
n = B("n")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.s: B = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.o: F = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.y: I = None
        self.v: E = None
        self.p: D = None
        self.t: B = None
        self.x: E = None
        self.q: D = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.v: C = None
        self.q: F = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: C = None
        self.txt = txt

h = A("h")
a = B("a")
c = C("c")
e = D("e")
k = E("k")
j = F("j")
l = G("l")
g = H("g")
d = I("d")
n = B("n")

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