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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: I = None
        self.x: I = None
        self.t: I = None
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.z: A = None
        self.q: D = None
        self.v: C = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: I = None
        self.x: I = None
        self.t: I = None
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.z: A = None
        self.q: D = None
        self.v: C = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

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

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

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