class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.v: I = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: I = None
        self.z: H = None
        self.q: B = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: I = None
        self.v: E = None
        self.w: C = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: I = None
        self.z: H = None
        self.q: B = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: I = None
        self.v: E = None
        self.w: C = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

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

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