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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.v: E = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.u: D = None
        self.o: H = None
        self.s: H = None
        self.r: G = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: E = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: E = None
        self.p: E = None
        self.s: E = None
        self.o: A = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.v: E = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.u: D = None
        self.o: H = None
        self.s: H = None
        self.r: G = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: E = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: E = None
        self.p: E = None
        self.s: E = None
        self.o: A = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

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

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