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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: G = None
        self.u: C = None
        self.w: E = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.o: D = None
        self.v: A = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: G = None
        self.u: C = None
        self.w: E = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.o: D = None
        self.v: A = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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