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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: E = None
        self.q: E = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: A = None
        self.w: J = None
        self.v: B = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.r: J = None
        self.o: A = None
        self.z: G = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: I = None
        self.y: A = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: E = None
        self.q: E = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: A = None
        self.w: J = None
        self.v: B = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.r: J = None
        self.o: A = None
        self.z: G = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: I = None
        self.y: A = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

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

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