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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: D = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
a = C("a")
g = D("g")
h = E("h")
n = F("n")
b = G("b")
j = H("j")

l.y = j
l.s = a
l.v = a
l.r = g
l.o = h
l.p = h
m.x = b
m.s = h
a.z = g
a.s = m
g.q = j
g.r = j
g.z = h
g.t = h
g.o = h
g.y = l
h.s = a
h.t = j
h.r = l
h.v = l
h.o = m
n.z = m
n.x = m
n.t = g
n.r = b
b.s = a
b.v = g
b.y = g
b.o = n
b.t = l
j.t = n
j.x = h
j.y = b
j.s = a
j.z = a
j.w = l
j.v = l
assert m.s.t.t.x.x.y.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: C = None
        self.r: D = None
        self.o: E = None
        self.p: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: D = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
a = C("a")
g = D("g")
h = E("h")
n = F("n")
b = G("b")
j = H("j")

l.y = j
l.s = a
l.v = a
l.r = g
l.o = h
l.p = h
m.x = b
m.s = h
a.z = g
a.s = m
g.q = j
g.r = j
g.z = h
g.t = h
g.o = h
g.y = l
h.s = a
h.t = j
h.r = l
h.v = l
h.o = m
n.z = m
n.x = m
n.t = g
n.r = b
b.s = a
b.v = g
b.y = g
b.o = n
b.t = l
j.t = n
j.x = h
j.y = b
j.s = a
j.z = a
j.w = l
j.v = l
assert m.s.t.t.x.x.y.r.s.txt == "a"