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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: B = None
        self.q: D = None
        self.v: A = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.q: G = None
        self.v: C = None
        self.s: B = None
        self.z: C = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.v: H = None
        self.p: C = None
        self.t: F = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.o: H = None
        self.q: E = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: B = None
        self.q: D = None
        self.v: A = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.q: G = None
        self.v: C = None
        self.s: B = None
        self.z: C = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.v: H = None
        self.p: C = None
        self.t: F = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.o: H = None
        self.q: E = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

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

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