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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: B = None
        self.y: H = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: B = None
        self.u: G = None
        self.p: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: B = None
        self.y: H = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: B = None
        self.u: G = None
        self.p: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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