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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.o: E = None
        self.u: A = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.t: G = None
        self.u: F = None
        self.y: G = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.o: E = None
        self.u: A = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.t: G = None
        self.u: F = None
        self.y: G = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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