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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.p: H = None
        self.z: C = None
        self.r: G = None
        self.y: G = None
        self.u: D = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.s: C = None
        self.u: A = None
        self.t: E = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

f = A("f")
d = B("d")
b = C("b")
m = D("m")
l = E("l")
a = F("a")
n = G("n")
g = H("g")
e = C("e")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.p: H = None
        self.z: C = None
        self.r: G = None
        self.y: G = None
        self.u: D = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.s: C = None
        self.u: A = None
        self.t: E = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

f = A("f")
d = B("d")
b = C("b")
m = D("m")
l = E("l")
a = F("a")
n = G("n")
g = H("g")
e = C("e")

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