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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.v: A = None
        self.p: F = None
        self.s: I = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.y: A = None
        self.s: B = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: D = None
        self.v: A = None
        self.p: F = None
        self.s: I = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.y: A = None
        self.s: B = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

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