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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: G = None
        self.w: E = None
        self.q: G = None
        self.z: G = None
        self.x: D = None
        self.t: C = None
        self.o: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: J = None
        self.o: I = None
        self.v: F = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: J = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: G = None
        self.y: C = None
        self.r: D = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: G = None
        self.w: E = None
        self.q: G = None
        self.z: G = None
        self.x: D = None
        self.t: C = None
        self.o: E = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: J = None
        self.o: I = None
        self.v: F = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: J = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: G = None
        self.y: C = None
        self.r: D = None
        self.q: A = None
        self.txt = txt

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

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