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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: C = None
        self.t: I = None
        self.x: I = None
        self.p: C = None
        self.u: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.u: J = None
        self.r: F = None
        self.s: F = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: J = None
        self.w: B = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.t: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.q: F = None
        self.x: B = None
        self.o: J = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.u: I = None
        self.q: F = None
        self.z: A = None
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: C = None
        self.t: I = None
        self.x: I = None
        self.p: C = None
        self.u: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.u: J = None
        self.r: F = None
        self.s: F = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: J = None
        self.w: B = None
        self.v: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.t: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.q: F = None
        self.x: B = None
        self.o: J = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.u: I = None
        self.q: F = None
        self.z: A = None
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

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