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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: B = None
        self.y: F = None
        self.p: E = None
        self.t: B = None
        self.txt = txt

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

h = A("h")
i = B("i")
g = C("g")
n = D("n")
e = E("e")
d = F("d")
f = G("f")
k = H("k")
j = C("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: B = None
        self.y: F = None
        self.p: E = None
        self.t: B = None
        self.txt = txt

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

h = A("h")
i = B("i")
g = C("g")
n = D("n")
e = E("e")
d = F("d")
f = G("f")
k = H("k")
j = C("j")

h.p = d
h.v = j
h.x = g
h.y = i
h.z = e
h.s = n
i.u = j
i.y = j
i.o = h
i.x = e
i.z = f
g.u = j
g.s = f
g.v = h
n.x = j
e.p = k
d.s = f
d.r = i
d.v = e
d.x = n
d.o = k
f.r = n
f.z = i
f.t = i
f.y = d
f.p = e
k.x = h
k.p = i
k.v = i
k.u = f
k.s = d
k.w = n
k.r = n
j.u = g
j.s = f
j.v = h
assert h.y.x.p.u.r.txt == "n"