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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.z: I = None
        self.v: A = None
        self.p: C = None
        self.x: C = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.z: I = None
        self.v: A = None
        self.p: C = None
        self.x: C = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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