class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: B = None
        self.q: G = None
        self.s: C = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: J = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: I = None
        self.x: A = None
        self.u: J = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: A = None
        self.u: J = None
        self.o: J = None
        self.v: I = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.t: B = None
        self.y: C = None
        self.x: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: J = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: I = None
        self.x: A = None
        self.u: J = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: A = None
        self.u: J = None
        self.o: J = None
        self.v: I = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: C = None
        self.t: B = None
        self.y: C = None
        self.x: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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