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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.x: G = None
        self.u: A = None
        self.v: H = None
        self.z: H = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: H = None
        self.w: F = None
        self.v: G = None
        self.t: H = None
        self.p: G = None
        self.q: E = None
        self.txt = txt

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

m = A("m")
h = B("h")
l = C("l")
k = D("k")
i = E("i")
g = F("g")
f = G("f")
e = H("e")
d = G("d")
j = A("j")

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.x: G = None
        self.u: A = None
        self.v: H = None
        self.z: H = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: H = None
        self.w: F = None
        self.v: G = None
        self.t: H = None
        self.p: G = None
        self.q: E = None
        self.txt = txt

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

m = A("m")
h = B("h")
l = C("l")
k = D("k")
i = E("i")
g = F("g")
f = G("f")
e = H("e")
d = G("d")
j = A("j")

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