class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: E = None
        self.w: I = None
        self.s: G = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: I = None
        self.v: E = None
        self.x: B = None
        self.t: C = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.u: D = None
        self.t: D = None
        self.z: C = None
        self.v: I = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: I = None
        self.v: E = None
        self.x: B = None
        self.t: C = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.u: D = None
        self.t: D = None
        self.z: C = None
        self.v: I = None
        self.o: G = None
        self.txt = txt

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

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