class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: H = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.w: E = None
        self.t: D = None
        self.x: H = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: H = None
        self.w: E = None
        self.x: C = None
        self.v: C = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.y: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.w: E = None
        self.t: D = None
        self.x: H = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: H = None
        self.w: E = None
        self.x: C = None
        self.v: C = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.y: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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