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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: D = None
        self.r: I = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: C = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.o: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: A = None
        self.u: C = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.u: D = None
        self.w: F = None
        self.s: D = None
        self.p: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: D = None
        self.r: I = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: C = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.o: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: A = None
        self.u: C = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.u: D = None
        self.w: F = None
        self.s: D = None
        self.p: I = None
        self.txt = txt

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

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