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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: E = None
        self.v: D = None
        self.y: B = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.x: B = None
        self.z: G = None
        self.q: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: E = None
        self.v: D = None
        self.y: B = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.x: B = None
        self.z: G = None
        self.q: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

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