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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.u: B = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.u: C = None
        self.p: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: G = None
        self.q: A = None
        self.r: I = None
        self.u: I = None
        self.w: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: G = None
        self.p: H = None
        self.x: B = None
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.u: B = None
        self.t: G = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.u: C = None
        self.p: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: G = None
        self.q: A = None
        self.r: I = None
        self.u: I = None
        self.w: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: G = None
        self.p: H = None
        self.x: B = None
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

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