class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.v: G = None
        self.x: E = None
        self.t: C = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: G = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: E = None
        self.z: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: G = None
        self.o: E = None
        self.y: G = None
        self.p: A = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: G = None
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: E = None
        self.z: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: G = None
        self.o: E = None
        self.y: G = None
        self.p: A = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

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

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