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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.o: D = None
        self.r: F = None
        self.w: F = None
        self.x: H = None
        self.u: I = None
        self.p: H = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: A = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: I = None
        self.w: J = None
        self.v: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: A = None
        self.q: G = None
        self.s: H = None
        self.y: H = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.o: D = None
        self.r: F = None
        self.w: F = None
        self.x: H = None
        self.u: I = None
        self.p: H = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: A = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: I = None
        self.w: J = None
        self.v: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: A = None
        self.q: G = None
        self.s: H = None
        self.y: H = None
        self.v: C = None
        self.t: D = None
        self.txt = txt

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

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

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