class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: G = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: G = None
        self.s: D = None
        self.y: G = None
        self.q: I = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: D = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: E = None
        self.v: A = None
        self.z: G = None
        self.p: B = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: H = None
        self.q: I = None
        self.z: E = None
        self.p: A = None
        self.x: B = None
        self.r: I = None
        self.t: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: F = None
        self.v: H = None
        self.q: C = None
        self.w: G = None
        self.r: G = None
        self.s: C = None
        self.txt = txt

f = A("f")
h = B("h")
j = C("j")
c = D("c")
i = E("i")
l = F("l")
n = G("n")
m = H("m")
k = I("k")

f.u = j
f.v = n
f.x = k
h.o = j
h.y = j
h.u = c
h.t = k
j.z = i
j.w = i
j.p = n
j.y = n
j.s = c
j.q = k
c.z = f
i.u = m
i.x = c
i.o = h
i.t = f
l.q = m
l.x = i
l.v = f
l.y = f
l.z = n
l.p = h
l.s = c
n.w = i
n.z = i
n.t = i
n.u = m
n.q = k
n.r = k
n.y = k
n.p = f
n.x = h
m.z = n
m.t = n
m.q = c
m.y = f
k.p = j
k.q = j
k.s = j
k.t = l
k.v = m
k.w = n
k.r = n
assert j.z.t.v.z.o.t.q.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: G = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.y: C = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: G = None
        self.s: D = None
        self.y: G = None
        self.q: I = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: D = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: E = None
        self.v: A = None
        self.z: G = None
        self.p: B = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: H = None
        self.q: I = None
        self.z: E = None
        self.p: A = None
        self.x: B = None
        self.r: I = None
        self.t: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: D = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: F = None
        self.v: H = None
        self.q: C = None
        self.w: G = None
        self.r: G = None
        self.s: C = None
        self.txt = txt

f = A("f")
h = B("h")
j = C("j")
c = D("c")
i = E("i")
l = F("l")
n = G("n")
m = H("m")
k = I("k")

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