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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.w: E = None
        self.q: C = None
        self.t: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.w: E = None
        self.q: C = None
        self.t: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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