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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.w: A = None
        self.p: A = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: H = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: B = None
        self.u: E = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.w: A = None
        self.p: A = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: H = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: B = None
        self.u: E = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

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