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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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