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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: B = None
        self.z: C = None
        self.x: E = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: B = None
        self.z: C = None
        self.x: E = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

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

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