class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.u: G = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.r: F = None
        self.s: F = None
        self.u: B = None
        self.q: B = None
        self.v: D = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: G = None
        self.o: G = None
        self.v: H = None
        self.s: H = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.u: G = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.r: F = None
        self.s: F = None
        self.u: B = None
        self.q: B = None
        self.v: D = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: G = None
        self.o: G = None
        self.v: H = None
        self.s: H = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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