class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: C = None
        self.s: I = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

k = A("k")
m = B("m")
b = C("b")
j = D("j")
l = E("l")
d = F("d")
h = G("h")
e = H("e")
n = I("n")

k.z = n
k.s = n
k.q = b
k.t = h
m.u = e
m.s = e
m.z = n
m.q = j
m.w = j
m.v = h
b.q = e
b.y = k
b.x = h
b.v = h
b.u = l
b.s = j
j.t = l
j.p = l
j.x = d
j.v = h
l.s = b
l.w = d
d.s = m
d.u = j
d.o = n
h.o = b
h.u = l
h.s = l
h.t = e
h.r = e
h.q = j
e.s = m
e.t = j
n.s = j
n.z = j
n.w = d
n.p = k
n.o = m
n.t = h
n.v = h
n.q = h
assert n.p.q.x.q.x.u.x.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: C = None
        self.s: I = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

k = A("k")
m = B("m")
b = C("b")
j = D("j")
l = E("l")
d = F("d")
h = G("h")
e = H("e")
n = I("n")

k.z = n
k.s = n
k.q = b
k.t = h
m.u = e
m.s = e
m.z = n
m.q = j
m.w = j
m.v = h
b.q = e
b.y = k
b.x = h
b.v = h
b.u = l
b.s = j
j.t = l
j.p = l
j.x = d
j.v = h
l.s = b
l.w = d
d.s = m
d.u = j
d.o = n
h.o = b
h.u = l
h.s = l
h.t = e
h.r = e
h.q = j
e.s = m
e.t = j
n.s = j
n.z = j
n.w = d
n.p = k
n.o = m
n.t = h
n.v = h
n.q = h
assert n.p.q.x.q.x.u.x.o.o.txt == "m"