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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.y: C = None
        self.w: H = None
        self.u: B = None
        self.s: E = None
        self.v: A = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.s: C = None
        self.t: B = None
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: C = None
        self.o: J = None
        self.x: C = None
        self.y: J = None
        self.u: F = None
        self.r: J = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.y: C = None
        self.w: H = None
        self.u: B = None
        self.s: E = None
        self.v: A = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.s: C = None
        self.t: B = None
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: C = None
        self.o: J = None
        self.x: C = None
        self.y: J = None
        self.u: F = None
        self.r: J = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

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

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

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