class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.q: D = None
        self.t: F = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.q: G = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.z: A = None
        self.y: D = None
        self.v: A = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: G = None
        self.u: F = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.q: D = None
        self.t: F = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.s: C = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.q: G = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.z: A = None
        self.y: D = None
        self.v: A = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: G = None
        self.u: F = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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