class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.z: D = None
        self.v: I = None
        self.o: G = None
        self.r: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.w: F = None
        self.t: F = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.r: I = None
        self.t: H = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.w: F = None
        self.t: F = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.r: I = None
        self.t: H = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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