class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.q: D = None
        self.s: C = None
        self.r: H = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: C = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

a = A("a")
j = B("j")
g = C("g")
n = D("n")
m = E("m")
h = F("h")
e = G("e")
i = H("i")
k = E("k")
c = F("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.q: D = None
        self.s: C = None
        self.r: H = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: C = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

a = A("a")
j = B("j")
g = C("g")
n = D("n")
m = E("m")
h = F("h")
e = G("e")
i = H("i")
k = E("k")
c = F("c")

a.r = m
j.x = e
j.u = g
j.t = a
j.v = a
j.y = h
j.q = i
j.o = n
g.s = a
g.x = n
g.v = c
g.u = i
g.o = e
g.r = j
n.o = i
n.r = c
n.p = g
m.p = k
m.z = h
m.q = n
m.s = g
m.v = g
m.r = i
m.y = e
h.r = c
h.t = n
h.v = n
e.q = i
e.p = j
e.t = h
i.v = c
i.o = g
i.s = h
i.t = a
k.p = m
k.z = c
k.q = n
k.s = g
k.v = g
k.r = i
k.y = e
c.r = h
c.t = n
c.v = n
assert c.t.p.u.s.t.p.r.q.v.v.txt == "n"