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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.w: A = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: I = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.t: C = None
        self.x: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.w: A = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: I = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.t: C = None
        self.x: A = None
        self.p: F = None
        self.txt = txt

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

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