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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.x: H = None
        self.r: F = None
        self.z: D = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.s: A = None
        self.u: A = None
        self.q: D = None
        self.r: H = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.x: H = None
        self.r: F = None
        self.z: D = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.s: A = None
        self.u: A = None
        self.q: D = None
        self.r: H = None
        self.t: H = None
        self.txt = txt

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

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

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