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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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