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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.u: J = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.u: J = None
        self.v: H = None
        self.txt = txt

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

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

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