class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.q: C = None
        self.r: F = None
        self.y: E = None
        self.o: F = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: A = None
        self.r: D = None
        self.y: A = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: H = None
        self.o: C = None
        self.y: H = None
        self.r: B = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: A = None
        self.r: D = None
        self.y: A = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: H = None
        self.o: C = None
        self.y: H = None
        self.r: B = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

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

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