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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.r: A = None
        self.t: C = None
        self.p: G = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.q: G = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.r: A = None
        self.t: C = None
        self.p: G = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.q: G = None
        self.w: D = None
        self.s: D = None
        self.txt = txt

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

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