class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: I = None
        self.q: F = None
        self.w: E = None
        self.s: D = None
        self.r: I = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.r: B = None
        self.o: I = None
        self.x: E = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.p: H = None
        self.t: G = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: E = None
        self.r: B = None
        self.o: I = None
        self.x: E = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.p: H = None
        self.t: G = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

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