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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.w: F = None
        self.r: C = None
        self.v: I = None
        self.u: I = None
        self.o: E = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: F = None
        self.z: I = None
        self.u: E = None
        self.p: A = None
        self.w: C = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.v: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.w: F = None
        self.r: C = None
        self.v: I = None
        self.u: I = None
        self.o: E = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: F = None
        self.z: I = None
        self.u: E = None
        self.p: A = None
        self.w: C = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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