class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: I = None
        self.v: E = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: A = None
        self.u: G = None
        self.v: I = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: A = None
        self.u: G = None
        self.v: I = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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