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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.q: D = None
        self.w: E = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.v: G = None
        self.p: I = None
        self.u: A = None
        self.z: A = None
        self.x: F = None
        self.q: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: G = None
        self.u: H = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.v: A = None
        self.y: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.q: D = None
        self.w: E = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.v: G = None
        self.p: I = None
        self.u: A = None
        self.z: A = None
        self.x: F = None
        self.q: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: G = None
        self.u: H = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.v: A = None
        self.y: A = None
        self.s: F = None
        self.txt = txt

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

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

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