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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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

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