class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.z: E = None
        self.y: D = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.o: F = None
        self.txt = txt

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

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

e = A("e")
h = B("h")
k = C("k")
f = D("f")
l = E("l")
b = F("b")
d = G("d")
n = H("n")
c = F("c")

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.o: F = None
        self.txt = txt

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

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

e = A("e")
h = B("h")
k = C("k")
f = D("f")
l = E("l")
b = F("b")
d = G("d")
n = H("n")
c = F("c")

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