class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

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

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

n = A("n")
l = B("l")
i = C("i")
d = D("d")
e = E("e")
m = F("m")
b = G("b")
g = H("g")
h = G("h")
c = D("c")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

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

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

n = A("n")
l = B("l")
i = C("i")
d = D("d")
e = E("e")
m = F("m")
b = G("b")
g = H("g")
h = G("h")
c = D("c")

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