class A:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: E = None
        self.w: H = None
        self.z: B = None
        self.u: I = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: E = None
        self.w: H = None
        self.z: B = None
        self.u: I = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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