class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.w: D = None
        self.u: C = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: B = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: I = None
        self.s: H = None
        self.v: F = None
        self.w: D = None
        self.x: D = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: B = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: I = None
        self.s: H = None
        self.v: F = None
        self.w: D = None
        self.x: D = None
        self.q: H = None
        self.txt = txt

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

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