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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: G = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: E = None
        self.z: A = None
        self.w: I = None
        self.p: A = None
        self.q: C = None
        self.s: C = None
        self.v: I = None
        self.y: I = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: F = None
        self.s: I = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.p: J = None
        self.v: J = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: G = None
        self.w: F = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: E = None
        self.z: A = None
        self.w: I = None
        self.p: A = None
        self.q: C = None
        self.s: C = None
        self.v: I = None
        self.y: I = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: F = None
        self.s: I = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.p: J = None
        self.v: J = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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