class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: I = None
        self.r: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: J = None
        self.t: G = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: J = None
        self.r: C = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.x: D = None
        self.w: I = None
        self.z: A = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: J = None
        self.t: G = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: J = None
        self.r: C = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.x: D = None
        self.w: I = None
        self.z: A = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

i.t = g
i.o = a
i.r = j
e.s = c
n.q = j
n.s = j
n.w = j
n.p = e
n.r = l
n.t = h
n.u = d
h.w = a
h.u = i
d.p = a
d.r = j
d.t = c
d.o = n
d.q = n
l.x = c
l.w = j
l.q = j
l.r = n
c.z = g
c.x = n
c.w = e
g.u = h
a.z = h
j.s = c
j.q = g
j.x = h
j.w = a
j.z = i
j.o = e
j.t = d
assert c.w.s.w.txt == "e"