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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: G = None
        self.u: H = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: E = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: G = None
        self.u: H = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: E = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

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

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

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