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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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