class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: E = None
        self.o: J = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: D = None
        self.x: C = None
        self.v: D = None
        self.o: B = None
        self.r: C = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.x: A = None
        self.s: A = None
        self.p: I = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: E = None
        self.o: J = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: D = None
        self.x: C = None
        self.v: D = None
        self.o: B = None
        self.r: C = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.x: A = None
        self.s: A = None
        self.p: I = None
        self.r: G = None
        self.txt = txt

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

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