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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.w: G = None
        self.z: I = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: H = None
        self.r: D = None
        self.z: G = None
        self.v: E = None
        self.w: E = None
        self.t: I = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: H = None
        self.z: E = None
        self.x: C = None
        self.s: I = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.o: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.w: G = None
        self.z: I = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: H = None
        self.r: D = None
        self.z: G = None
        self.v: E = None
        self.w: E = None
        self.t: I = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: H = None
        self.z: E = None
        self.x: C = None
        self.s: I = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.o: F = None
        self.w: C = None
        self.txt = txt

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

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