class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: G = None
        self.s: C = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.r: D = None
        self.t: A = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: G = None
        self.s: C = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.r: D = None
        self.t: A = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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