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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: D = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.y: H = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.o: H = None
        self.x: E = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.o: H = None
        self.p: C = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

a = A("a")
k = B("k")
i = C("i")
h = D("h")
j = E("j")
f = F("f")
l = G("l")
c = H("c")
n = I("n")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: D = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.y: H = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.o: H = None
        self.x: E = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.o: H = None
        self.p: C = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

a = A("a")
k = B("k")
i = C("i")
h = D("h")
j = E("j")
f = F("f")
l = G("l")
c = H("c")
n = I("n")

a.y = c
k.q = i
k.z = h
k.u = f
k.p = f
i.p = h
i.t = f
i.y = c
i.r = l
h.w = f
j.s = k
j.x = k
f.z = j
f.x = j
f.t = l
f.p = l
f.o = c
l.w = h
c.r = n
c.s = j
c.q = h
c.x = h
c.w = h
c.t = i
c.u = i
c.y = a
n.s = c
n.o = c
n.t = h
n.p = i
n.u = i
n.w = a
assert k.z.w.o.s.x.q.y.y.txt == "a"