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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.t: G = None
        self.q: A = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

k = A("k")
c = B("c")
n = C("n")
i = D("i")
a = E("a")
b = F("b")
l = G("l")
m = H("m")
h = F("h")
e = F("e")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.t: G = None
        self.q: A = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

k = A("k")
c = B("c")
n = C("n")
i = D("i")
a = E("a")
b = F("b")
l = G("l")
m = H("m")
h = F("h")
e = F("e")

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