class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: G = None
        self.z: E = None
        self.u: J = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: I = None
        self.o: H = None
        self.y: H = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: I = None
        self.x: H = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: A = None
        self.z: C = None
        self.s: G = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: I = None
        self.o: H = None
        self.y: H = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: I = None
        self.x: H = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: A = None
        self.z: C = None
        self.s: G = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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