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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: G = None
        self.z: C = None
        self.y: I = None
        self.w: A = None
        self.p: A = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.r: A = None
        self.v: D = None
        self.u: H = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.w: A = None
        self.y: E = None
        self.s: B = None
        self.p: D = None
        self.o: C = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: G = None
        self.z: C = None
        self.y: I = None
        self.w: A = None
        self.p: A = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.r: A = None
        self.v: D = None
        self.u: H = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.w: A = None
        self.y: E = None
        self.s: B = None
        self.p: D = None
        self.o: C = None
        self.u: D = None
        self.z: E = None
        self.txt = txt

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

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