class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: H = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.u: F = None
        self.r: F = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.s: F = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.z: F = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: I = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.u: F = None
        self.r: F = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.s: F = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.z: F = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: I = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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