class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: C = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

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

i = A("i")
a = B("a")
e = C("e")
f = D("f")
g = E("g")
d = C("d")
h = A("h")
m = B("m")
n = E("n")
b = A("b")

i.t = n
i.w = n
a.y = d
a.q = d
e.u = b
e.v = h
e.q = g
e.s = m
e.x = a
f.y = h
f.w = e
f.s = m
f.u = g
g.x = h
g.t = f
d.u = b
d.v = h
d.q = n
d.s = a
d.x = a
h.t = g
h.w = g
m.y = e
m.q = e
n.x = i
n.t = f
b.t = g
b.w = g
assert h.w.t.w.s.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: C = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

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

i = A("i")
a = B("a")
e = C("e")
f = D("f")
g = E("g")
d = C("d")
h = A("h")
m = B("m")
n = E("n")
b = A("b")

i.t = n
i.w = n
a.y = d
a.q = d
e.u = b
e.v = h
e.q = g
e.s = m
e.x = a
f.y = h
f.w = e
f.s = m
f.u = g
g.x = h
g.t = f
d.u = b
d.v = h
d.q = n
d.s = a
d.x = a
h.t = g
h.w = g
m.y = e
m.q = e
n.x = i
n.t = f
b.t = g
b.w = g
assert h.w.t.w.s.q.u.txt == "b"