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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.u: C = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.o: G = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.u: C = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.o: G = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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