class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: J = None
        self.v: E = None
        self.r: C = None
        self.p: B = None
        self.x: G = None
        self.t: J = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: C = None
        self.q: D = None
        self.p: B = None
        self.u: J = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: J = None
        self.x: F = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: F = None
        self.z: A = None
        self.p: J = None
        self.r: D = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: J = None
        self.v: E = None
        self.r: C = None
        self.p: B = None
        self.x: G = None
        self.t: J = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: C = None
        self.q: D = None
        self.p: B = None
        self.u: J = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: J = None
        self.x: F = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: F = None
        self.z: A = None
        self.p: J = None
        self.r: D = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: H = None
        self.txt = txt

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

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