class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.o: I = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: H = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: H = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

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

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