class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: I = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.r: D = None
        self.v: A = None
        self.x: G = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.s: C = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.q: A = None
        self.w: G = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.u: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.r: D = None
        self.v: A = None
        self.x: G = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.s: C = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.q: A = None
        self.w: G = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.u: I = None
        self.txt = txt

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

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