class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: H = None
        self.z: C = None
        self.w: D = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.t: F = None
        self.y: F = None
        self.z: H = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: E = None
        self.y: A = None
        self.q: E = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.t: F = None
        self.y: F = None
        self.z: H = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: E = None
        self.y: A = None
        self.q: E = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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