class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: J = None
        self.o: I = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.q: C = None
        self.u: B = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: E = None
        self.q: E = None
        self.z: J = None
        self.v: A = None
        self.x: B = None
        self.u: H = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.y: I = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: B = None
        self.o: G = None
        self.s: A = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: J = None
        self.o: I = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.q: C = None
        self.u: B = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: E = None
        self.q: E = None
        self.z: J = None
        self.v: A = None
        self.x: B = None
        self.u: H = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: B = None
        self.y: I = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: B = None
        self.o: G = None
        self.s: A = None
        self.v: H = None
        self.txt = txt

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

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