class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.w: C = None
        self.p: G = None
        self.x: B = None
        self.v: B = None
        self.q: B = None
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: G = None
        self.r: B = None
        self.x: C = None
        self.q: A = None
        self.o: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.x: F = None
        self.r: F = None
        self.q: B = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: G = None
        self.r: B = None
        self.x: C = None
        self.q: A = None
        self.o: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.x: F = None
        self.r: F = None
        self.q: B = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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