class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.x: B = None
        self.z: H = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.v: A = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: D = None
        self.o: C = None
        self.y: H = None
        self.w: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.v: A = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: D = None
        self.o: C = None
        self.y: H = None
        self.w: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.o: B = None
        self.txt = txt

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

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