class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: E = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: B = None
        self.v: F = None
        self.t: I = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: G = None
        self.q: I = None
        self.r: F = None
        self.v: I = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: J = None
        self.x: C = None
        self.v: J = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: E = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: B = None
        self.v: F = None
        self.t: I = None
        self.o: J = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: G = None
        self.q: I = None
        self.r: F = None
        self.v: I = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: J = None
        self.x: C = None
        self.v: J = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: G = None
        self.txt = txt

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

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