class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: F = None
        self.s: E = None
        self.y: H = None
        self.x: H = None
        self.r: C = None
        self.v: I = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.p: D = None
        self.v: I = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.z: H = None
        self.v: F = None
        self.u: G = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.r: B = None
        self.t: E = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.x: H = None
        self.z: D = None
        self.s: F = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.x: G = None
        self.w: I = None
        self.t: C = None
        self.s: G = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: F = None
        self.s: E = None
        self.y: H = None
        self.x: H = None
        self.r: C = None
        self.v: I = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.p: D = None
        self.v: I = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.z: H = None
        self.v: F = None
        self.u: G = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.r: B = None
        self.t: E = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.x: H = None
        self.z: D = None
        self.s: F = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.x: G = None
        self.w: I = None
        self.t: C = None
        self.s: G = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

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

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