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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: I = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.o: D = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: I = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.o: D = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

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

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