class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: B = None
        self.p: B = None
        self.w: F = None
        self.r: D = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: E = None
        self.p: C = None
        self.v: B = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: E = None
        self.p: C = None
        self.v: B = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

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

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