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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.u: A = None
        self.o: E = None
        self.v: H = None
        self.p: A = None
        self.y: D = None
        self.x: A = None
        self.w: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: J = None
        self.t: F = None
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.z: C = None
        self.s: I = None
        self.x: A = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: D = None
        self.x: J = None
        self.y: D = None
        self.v: A = None
        self.p: G = None
        self.txt = txt

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

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

f = A("f")
d = B("d")
a = C("a")
n = D("n")
b = E("b")
g = F("g")
h = G("h")
e = H("e")
l = I("l")
c = J("c")

f.x = l
f.v = h
f.u = a
f.z = a
f.t = d
d.r = h
d.s = h
d.u = f
d.p = f
d.x = f
d.t = f
d.o = b
d.w = b
d.v = e
d.y = n
a.w = g
a.t = g
a.s = c
a.z = f
a.y = h
n.r = l
n.p = g
b.v = n
b.u = h
b.z = a
b.r = a
b.s = l
b.x = f
b.q = f
g.u = c
g.t = l
h.y = f
e.z = c
e.x = c
e.r = n
e.y = n
e.v = f
e.p = h
l.t = c
l.p = c
l.w = c
c.t = f
assert g.t.w.t.z.y.y.x.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: G = None
        self.u: C = None
        self.t: B = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.u: A = None
        self.o: E = None
        self.v: H = None
        self.p: A = None
        self.y: D = None
        self.x: A = None
        self.w: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: J = None
        self.t: F = None
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.z: C = None
        self.s: I = None
        self.x: A = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: D = None
        self.x: J = None
        self.y: D = None
        self.v: A = None
        self.p: G = None
        self.txt = txt

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

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

f = A("f")
d = B("d")
a = C("a")
n = D("n")
b = E("b")
g = F("g")
h = G("h")
e = H("e")
l = I("l")
c = J("c")

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