class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.r: F = None
        self.y: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.p: F = None
        self.w: A = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.r: F = None
        self.y: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.p: F = None
        self.w: A = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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