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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.o: B = None
        self.r: E = None
        self.v: E = None
        self.x: B = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.p: H = None
        self.v: D = None
        self.y: 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.y: F = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.o: B = None
        self.r: E = None
        self.v: E = None
        self.x: B = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: H = None
        self.p: H = None
        self.v: D = None
        self.y: 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.y: F = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

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

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