class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: B = None
        self.w: C = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.z: C = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.x: B = None
        self.q: H = None
        self.w: C = None
        self.r: D = None
        self.y: B = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

n = A("n")
c = B("c")
i = C("i")
d = D("d")
h = E("h")
e = F("e")
l = G("l")
m = H("m")
k = G("k")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.z: C = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.x: B = None
        self.q: H = None
        self.w: C = None
        self.r: D = None
        self.y: B = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

n = A("n")
c = B("c")
i = C("i")
d = D("d")
h = E("h")
e = F("e")
l = G("l")
m = H("m")
k = G("k")

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