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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.w: H = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: F = None
        self.q: B = None
        self.t: B = None
        self.x: B = None
        self.o: B = None
        self.y: B = None
        self.z: A = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.w: H = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: F = None
        self.q: B = None
        self.t: B = None
        self.x: B = None
        self.o: B = None
        self.y: B = None
        self.z: A = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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