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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.s: H = None
        self.u: H = None
        self.z: F = None
        self.y: D = None
        self.o: H = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.q: E = None
        self.z: D = None
        self.y: D = None
        self.o: G = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.w: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

e.o = j
e.x = m
e.y = b
g.p = l
g.y = l
g.w = l
g.x = j
g.z = j
g.s = f
g.u = f
g.o = f
g.t = f
m.z = e
m.t = h
m.s = g
m.w = g
m.r = j
m.x = l
l.y = g
l.o = g
l.x = e
l.z = e
l.t = d
l.s = d
l.p = f
l.r = j
l.u = n
b.x = d
b.o = d
b.t = d
b.r = n
b.q = n
b.z = l
b.y = l
b.w = m
j.s = e
j.y = e
j.w = d
j.x = d
d.w = j
d.s = f
d.z = f
d.u = b
f.s = d
f.r = j
f.p = j
f.w = j
f.u = b
f.z = l
f.o = l
f.q = h
f.y = g
h.p = g
n.x = d
n.o = d
n.t = d
n.r = b
n.q = b
n.z = l
n.y = l
n.w = m
assert e.o.s.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: C = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.s: H = None
        self.u: H = None
        self.z: F = None
        self.y: D = None
        self.o: H = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.q: E = None
        self.z: D = None
        self.y: D = None
        self.o: G = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.w: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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