class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: I = None
        self.t: C = None
        self.x: A = None
        self.s: B = None
        self.v: I = None
        self.w: B = None
        self.r: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: I = None
        self.t: C = None
        self.x: A = None
        self.s: B = None
        self.v: I = None
        self.w: B = None
        self.r: A = None
        self.z: G = None
        self.txt = txt

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

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

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