class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: H = None
        self.u: E = None
        self.y: H = None
        self.t: E = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: D = None
        self.s: D = None
        self.t: A = None
        self.u: A = None
        self.x: H = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: G = None
        self.o: B = None
        self.u: A = None
        self.t: H = None
        self.x: G = None
        self.v: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.r: B = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: D = None
        self.s: D = None
        self.t: A = None
        self.u: A = None
        self.x: H = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: G = None
        self.o: B = None
        self.u: A = None
        self.t: H = None
        self.x: G = None
        self.v: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.r: B = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

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

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