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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.v: E = None
        self.u: G = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.q: B = None
        self.s: D = None
        self.y: E = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.v: E = None
        self.u: G = None
        self.z: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.q: B = None
        self.s: D = None
        self.y: E = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

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