class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.t: A = None
        self.s: G = None
        self.u: E = None
        self.p: E = None
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: H = None
        self.y: A = None
        self.v: D = None
        self.s: A = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: G = None
        self.z: A = None
        self.s: D = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.t: A = None
        self.s: G = None
        self.u: E = None
        self.p: E = None
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: H = None
        self.y: A = None
        self.v: D = None
        self.s: A = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: G = None
        self.z: A = None
        self.s: D = None
        self.x: H = None
        self.txt = txt

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

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