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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: E = None
        self.x: B = None
        self.s: E = None
        self.z: B = None
        self.t: B = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: I = None
        self.u: J = None
        self.w: J = None
        self.r: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: E = None
        self.x: B = None
        self.s: E = None
        self.z: B = None
        self.t: B = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: I = None
        self.u: J = None
        self.w: J = None
        self.r: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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