class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: G = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.p: I = None
        self.z: A = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.w: F = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: I = None
        self.p: I = None
        self.z: A = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.w: F = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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