class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.z: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.u: G = None
        self.w: F = None
        self.s: I = None
        self.o: I = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.p: I = None
        self.q: B = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: H = None
        self.u: A = None
        self.r: H = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.u: G = None
        self.w: F = None
        self.s: I = None
        self.o: I = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.p: I = None
        self.q: B = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: H = None
        self.u: A = None
        self.r: H = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

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