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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.v: B = None
        self.y: H = None
        self.q: G = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.u: H = None
        self.w: E = None
        self.x: D = None
        self.s: A = None
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: I = None
        self.t: D = None
        self.p: H = None
        self.u: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.v: B = None
        self.y: H = None
        self.q: G = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.u: H = None
        self.w: E = None
        self.x: D = None
        self.s: A = None
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: I = None
        self.t: D = None
        self.p: H = None
        self.u: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

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