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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.t: I = None
        self.v: A = None
        self.q: C = None
        self.y: A = None
        self.p: E = None
        self.u: H = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.p: B = None
        self.s: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: A = None
        self.x: H = None
        self.q: I = None
        self.o: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.t: I = None
        self.v: A = None
        self.q: C = None
        self.y: A = None
        self.p: E = None
        self.u: H = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.p: B = None
        self.s: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: A = None
        self.x: H = None
        self.q: I = None
        self.o: F = None
        self.u: C = None
        self.txt = txt

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

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