class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: C = None
        self.x: E = None
        self.y: I = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.txt = txt

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

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