class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: F = None
        self.q: C = None
        self.x: I = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.u: A = None
        self.z: H = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.o: E = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.z: I = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.q: I = None
        self.t: I = None
        self.y: H = None
        self.z: I = None
        self.p: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.x: H = None
        self.r: F = None
        self.s: F = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.u: A = None
        self.z: H = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.o: E = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.z: I = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.q: I = None
        self.t: I = None
        self.y: H = None
        self.z: I = None
        self.p: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.x: H = None
        self.r: F = None
        self.s: F = None
        self.z: H = None
        self.txt = txt

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

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