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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: F = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.q: J = None
        self.o: H = None
        self.x: D = None
        self.s: F = None
        self.p: J = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.q: J = None
        self.x: H = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: H = None
        self.q: E = None
        self.x: E = None
        self.p: G = None
        self.y: A = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: F = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.q: J = None
        self.o: H = None
        self.x: D = None
        self.s: F = None
        self.p: J = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.q: J = None
        self.x: H = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: H = None
        self.q: E = None
        self.x: E = None
        self.p: G = None
        self.y: A = None
        self.v: H = None
        self.txt = txt

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

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