class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: B = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: C = None
        self.p: D = None
        self.y: A = None
        self.v: I = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.v: B = None
        self.w: B = None
        self.q: F = None
        self.y: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: B = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: C = None
        self.p: D = None
        self.y: A = None
        self.v: I = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.v: B = None
        self.w: B = None
        self.q: F = None
        self.y: D = None
        self.x: A = None
        self.txt = txt

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

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

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