class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: B = None
        self.r: I = None
        self.p: B = None
        self.w: J = None
        self.x: H = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.y: J = None
        self.z: B = None
        self.t: F = None
        self.v: G = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.p: C = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.z: J = None
        self.v: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: H = None
        self.z: G = None
        self.t: E = None
        self.s: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.y: J = None
        self.z: B = None
        self.t: F = None
        self.v: G = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.p: C = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.z: J = None
        self.v: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: H = None
        self.z: G = None
        self.t: E = None
        self.s: F = None
        self.q: H = None
        self.txt = txt

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

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