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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: I = None
        self.p: I = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.s: E = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.w: J = None
        self.z: F = None
        self.s: E = None
        self.x: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: I = None
        self.p: I = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.s: E = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.w: J = None
        self.z: F = None
        self.s: E = None
        self.x: D = None
        self.txt = txt

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

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

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