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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: I = None
        self.v: F = None
        self.t: I = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: I = None
        self.v: F = None
        self.t: I = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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