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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.p: C = None
        self.w: G = None
        self.r: A = None
        self.o: F = None
        self.s: F = None
        self.q: A = None
        self.z: F = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.v: E = None
        self.p: D = None
        self.s: I = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.q: E = None
        self.s: F = None
        self.o: H = None
        self.z: B = None
        self.v: D = None
        self.y: D = None
        self.x: A = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.p: C = None
        self.w: G = None
        self.r: A = None
        self.o: F = None
        self.s: F = None
        self.q: A = None
        self.z: F = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.v: E = None
        self.p: D = None
        self.s: I = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.q: E = None
        self.s: F = None
        self.o: H = None
        self.z: B = None
        self.v: D = None
        self.y: D = None
        self.x: A = None
        self.r: H = None
        self.txt = txt

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

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