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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.y: C = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: C = None
        self.u: H = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: E = None
        self.x: F = None
        self.t: D = None
        self.txt = txt

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

d = A("d")
g = B("g")
a = C("a")
b = D("b")
c = E("c")
i = F("i")
j = G("j")
m = H("m")
n = A("n")

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.y: C = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: C = None
        self.u: H = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: E = None
        self.x: F = None
        self.t: D = None
        self.txt = txt

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

d = A("d")
g = B("g")
a = C("a")
b = D("b")
c = E("c")
i = F("i")
j = G("j")
m = H("m")
n = A("n")

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