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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.z: A = None
        self.x: D = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: H = None
        self.u: C = None
        self.q: H = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.y: A = None
        self.t: C = None
        self.v: A = None
        self.o: A = None
        self.u: E = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.u: A = None
        self.t: E = None
        self.r: A = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.z: A = None
        self.x: D = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: H = None
        self.u: C = None
        self.q: H = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.y: A = None
        self.t: C = None
        self.v: A = None
        self.o: A = None
        self.u: E = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.u: A = None
        self.t: E = None
        self.r: A = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

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

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