class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: J = None
        self.r: I = None
        self.o: B = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: J = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: C = None
        self.s: H = None
        self.y: J = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.w: I = None
        self.r: G = None
        self.q: B = None
        self.v: A = None
        self.y: J = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: E = None
        self.y: B = None
        self.o: A = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

j = A("j")
d = B("d")
c = C("c")
a = D("a")
k = E("k")
f = F("f")
i = G("i")
m = H("m")
l = I("l")
g = J("g")

j.t = i
j.x = g
j.r = l
j.z = l
j.o = d
d.r = f
d.p = l
c.w = j
c.y = g
c.p = m
a.w = f
a.s = c
a.r = m
k.z = g
k.y = g
k.t = g
k.x = c
k.p = c
k.s = m
f.r = c
i.o = k
i.w = g
i.z = a
i.s = d
i.p = j
i.u = c
m.x = c
m.o = c
m.t = c
m.w = l
m.r = i
m.q = d
m.v = j
m.y = g
l.o = k
l.s = a
l.u = c
g.w = m
g.r = k
g.x = k
g.y = d
g.s = d
g.o = j
assert c.w.r.u.w.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: J = None
        self.r: I = None
        self.o: B = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: J = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: C = None
        self.s: H = None
        self.y: J = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.w: I = None
        self.r: G = None
        self.q: B = None
        self.v: A = None
        self.y: J = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: E = None
        self.y: B = None
        self.o: A = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

j = A("j")
d = B("d")
c = C("c")
a = D("a")
k = E("k")
f = F("f")
i = G("i")
m = H("m")
l = I("l")
g = J("g")

j.t = i
j.x = g
j.r = l
j.z = l
j.o = d
d.r = f
d.p = l
c.w = j
c.y = g
c.p = m
a.w = f
a.s = c
a.r = m
k.z = g
k.y = g
k.t = g
k.x = c
k.p = c
k.s = m
f.r = c
i.o = k
i.w = g
i.z = a
i.s = d
i.p = j
i.u = c
m.x = c
m.o = c
m.t = c
m.w = l
m.r = i
m.q = d
m.v = j
m.y = g
l.o = k
l.s = a
l.u = c
g.w = m
g.r = k
g.x = k
g.y = d
g.s = d
g.o = j
assert c.w.r.u.w.x.w.txt == "m"