class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.z: C = None
        self.o: B = None
        self.s: G = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: B = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: B = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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