class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: J = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.y: J = None
        self.p: C = None
        self.q: E = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: I = None
        self.t: F = None
        self.z: G = None
        self.o: I = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: B = None
        self.u: I = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.z: C = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: H = None
        self.p: J = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.y: J = None
        self.p: C = None
        self.q: E = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: I = None
        self.t: F = None
        self.z: G = None
        self.o: I = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: B = None
        self.u: I = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.z: C = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: H = None
        self.p: J = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: B = None
        self.txt = txt

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

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