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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

n = A("n")
g = B("g")
a = C("a")
l = D("l")
d = E("d")
e = F("e")
b = G("b")
h = H("h")
f = A("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

n = A("n")
g = B("g")
a = C("a")
l = D("l")
d = E("d")
e = F("e")
b = G("b")
h = H("h")
f = A("f")

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