class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: F = None
        self.v: I = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.u: F = None
        self.r: E = None
        self.q: D = None
        self.s: A = None
        self.y: H = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.y: H = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: H = None
        self.o: A = None
        self.w: C = None
        self.v: E = None
        self.s: C = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: H = None
        self.r: I = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.u: F = None
        self.r: E = None
        self.q: D = None
        self.s: A = None
        self.y: H = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.y: H = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: H = None
        self.o: A = None
        self.w: C = None
        self.v: E = None
        self.s: C = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: H = None
        self.r: I = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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