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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.t: E = None
        self.q: A = None
        self.o: B = None
        self.p: A = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: C = None
        self.t: E = None
        self.s: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.t: E = None
        self.q: A = None
        self.o: B = None
        self.p: A = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: C = None
        self.t: E = None
        self.s: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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