class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.txt = txt

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

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

i.z = g
i.w = g
i.q = h
n.s = g
n.o = d
n.p = d
n.z = l
n.q = i
n.w = a
n.y = e
n.t = e
n.r = h
e.y = n
l.t = a
l.z = h
a.w = d
a.x = d
a.t = g
b.w = a
g.q = i
g.p = a
g.x = a
h.u = a
h.x = i
d.w = n
assert h.u.x.w.txt == "n"