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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.r: C = None
        self.w: B = None
        self.y: E = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: G = None
        self.q: E = None
        self.p: A = None
        self.z: G = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

b = A("b")
d = B("d")
a = C("a")
m = D("m")
k = E("k")
i = F("i")
n = G("n")
c = H("c")
e = G("e")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.r: C = None
        self.w: B = None
        self.y: E = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: G = None
        self.q: E = None
        self.p: A = None
        self.z: G = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

b = A("b")
d = B("d")
a = C("a")
m = D("m")
k = E("k")
i = F("i")
n = G("n")
c = H("c")
e = G("e")

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