class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: A = None
        self.p: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: G = None
        self.y: H = None
        self.q: D = None
        self.z: D = None
        self.s: I = None
        self.u: H = None
        self.x: H = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.w: B = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: F = None
        self.r: H = None
        self.p: D = None
        self.o: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: G = None
        self.y: H = None
        self.q: D = None
        self.z: D = None
        self.s: I = None
        self.u: H = None
        self.x: H = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.w: B = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: F = None
        self.r: H = None
        self.p: D = None
        self.o: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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