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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.z: A = None
        self.v: C = None
        self.t: E = None
        self.u: C = None
        self.q: D = None
        self.x: E = None
        self.txt = txt

h = A("h")
n = B("n")
a = C("a")
d = D("d")
j = E("j")
m = F("m")
l = G("l")
f = H("f")
c = B("c")

h.s = l
n.x = d
n.o = m
n.z = a
n.p = c
n.t = c
n.q = c
n.v = f
n.s = j
a.s = j
a.w = n
d.u = j
d.q = j
d.t = h
d.o = h
d.z = h
d.v = a
d.x = f
j.z = m
j.v = f
m.s = l
m.o = l
l.q = h
f.y = h
f.z = h
f.r = a
f.v = a
f.u = a
f.t = j
f.x = j
f.q = d
c.x = d
c.o = m
c.z = a
c.p = n
c.t = n
c.q = n
c.v = f
c.s = j
assert a.s.z.o.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.z: A = None
        self.v: C = None
        self.t: E = None
        self.u: C = None
        self.q: D = None
        self.x: E = None
        self.txt = txt

h = A("h")
n = B("n")
a = C("a")
d = D("d")
j = E("j")
m = F("m")
l = G("l")
f = H("f")
c = B("c")

h.s = l
n.x = d
n.o = m
n.z = a
n.p = c
n.t = c
n.q = c
n.v = f
n.s = j
a.s = j
a.w = n
d.u = j
d.q = j
d.t = h
d.o = h
d.z = h
d.v = a
d.x = f
j.z = m
j.v = f
m.s = l
m.o = l
l.q = h
f.y = h
f.z = h
f.r = a
f.v = a
f.u = a
f.t = j
f.x = j
f.q = d
c.x = d
c.o = m
c.z = a
c.p = n
c.t = n
c.q = n
c.v = f
c.s = j
assert a.s.z.o.q.s.txt == "l"