class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: F = None
        self.q: F = None
        self.t: F = None
        self.p: F = None
        self.y: F = None
        self.r: B = None
        self.o: F = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: F = None
        self.q: F = None
        self.t: F = None
        self.p: F = None
        self.y: F = None
        self.r: B = None
        self.o: F = None
        self.s: E = None
        self.txt = txt

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

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

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