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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.q: E = None
        self.p: A = None
        self.v: H = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: A = None
        self.z: B = None
        self.txt = txt

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

d = A("d")
e = B("e")
h = C("h")
f = D("f")
i = E("i")
n = F("n")
g = G("g")
m = H("m")
k = C("k")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.q: E = None
        self.p: A = None
        self.v: H = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: A = None
        self.z: B = None
        self.txt = txt

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

d = A("d")
e = B("e")
h = C("h")
f = D("f")
i = E("i")
n = F("n")
g = G("g")
m = H("m")
k = C("k")

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