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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.w: B = None
        self.x: F = None
        self.u: A = None
        self.y: F = None
        self.r: A = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: I = None
        self.y: H = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.y: G = None
        self.q: B = None
        self.v: B = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.w: B = None
        self.x: F = None
        self.u: A = None
        self.y: F = None
        self.r: A = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: I = None
        self.y: H = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.y: G = None
        self.q: B = None
        self.v: B = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.y: B = None
        self.txt = txt

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

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