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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.w: H = None
        self.txt = txt

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

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