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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.u: C = None
        self.w: F = None
        self.p: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.u: C = None
        self.w: F = None
        self.p: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.txt = txt

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

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