class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.r: H = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: I = None
        self.q: J = None
        self.x: C = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: I = None
        self.q: A = None
        self.o: D = None
        self.p: I = None
        self.w: B = None
        self.txt = txt

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

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

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

n = A("n")
e = B("e")
c = C("c")
k = D("k")
f = E("f")
j = F("j")
m = G("m")
b = H("b")
i = I("i")
d = J("d")

n.y = j
e.o = c
e.w = i
e.r = b
e.y = k
e.u = n
c.p = m
c.s = k
k.t = i
k.s = i
k.v = f
k.o = j
k.u = j
k.r = j
k.x = e
k.q = n
k.w = c
k.p = c
f.r = e
f.o = b
j.y = n
j.u = i
j.q = d
j.x = c
j.s = m
j.r = b
m.t = e
m.w = e
m.y = i
m.p = i
m.q = n
m.o = k
b.r = c
b.s = f
i.x = k
d.t = i
d.v = n
assert f.r.w.x.v.r.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.r: H = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: I = None
        self.q: J = None
        self.x: C = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: I = None
        self.q: A = None
        self.o: D = None
        self.p: I = None
        self.w: B = None
        self.txt = txt

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

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

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

n = A("n")
e = B("e")
c = C("c")
k = D("k")
f = E("f")
j = F("j")
m = G("m")
b = H("b")
i = I("i")
d = J("d")

n.y = j
e.o = c
e.w = i
e.r = b
e.y = k
e.u = n
c.p = m
c.s = k
k.t = i
k.s = i
k.v = f
k.o = j
k.u = j
k.r = j
k.x = e
k.q = n
k.w = c
k.p = c
f.r = e
f.o = b
j.y = n
j.u = i
j.q = d
j.x = c
j.s = m
j.r = b
m.t = e
m.w = e
m.y = i
m.p = i
m.q = n
m.o = k
b.r = c
b.s = f
i.x = k
d.t = i
d.v = n
assert f.r.w.x.v.r.u.y.txt == "j"