class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: D = None
        self.q: F = None
        self.s: F = None
        self.o: B = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.r: E = None
        self.v: D = None
        self.p: A = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.s: E = None
        self.q: E = None
        self.t: A = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.t: B = None
        self.s: B = None
        self.v: G = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.r: E = None
        self.v: D = None
        self.p: A = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.s: E = None
        self.q: E = None
        self.t: A = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.t: B = None
        self.s: B = None
        self.v: G = None
        self.x: F = None
        self.txt = txt

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

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

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