class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: G = None
        self.s: E = None
        self.u: G = None
        self.z: D = None
        self.o: G = None
        self.p: C = None
        self.x: I = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.t: C = None
        self.q: E = None
        self.o: E = None
        self.y: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: I = None
        self.u: E = None
        self.r: B = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: G = None
        self.x: B = None
        self.p: C = None
        self.z: H = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: C = None
        self.w: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.t: C = None
        self.q: E = None
        self.o: E = None
        self.y: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: I = None
        self.u: E = None
        self.r: B = None
        self.p: D = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: G = None
        self.x: B = None
        self.p: C = None
        self.z: H = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: C = None
        self.w: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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