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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.x: D = None
        self.u: I = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: B = None
        self.t: A = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.x: D = None
        self.u: I = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: B = None
        self.t: A = None
        self.q: F = None
        self.txt = txt

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

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