class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: I = None
        self.w: I = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: J = None
        self.x: A = None
        self.r: C = None
        self.p: J = None
        self.q: J = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.p: B = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.y: F = None
        self.r: H = None
        self.z: D = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: J = None
        self.x: A = None
        self.r: C = None
        self.p: J = None
        self.q: J = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.p: B = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.y: F = None
        self.r: H = None
        self.z: D = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

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

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