class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: E = None
        self.v: J = None
        self.w: D = None
        self.q: C = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: I = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: J = None
        self.p: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: J = None
        self.x: C = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: I = None
        self.o: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: I = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: J = None
        self.p: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: J = None
        self.x: C = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: I = None
        self.o: E = None
        self.txt = txt

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

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