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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: G = None
        self.q: I = None
        self.z: B = None
        self.o: A = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: F = None
        self.v: H = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.x: B = None
        self.y: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: G = None
        self.q: I = None
        self.z: B = None
        self.o: A = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: B = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: F = None
        self.v: H = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.x: B = None
        self.y: D = None
        self.v: F = None
        self.txt = txt

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

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