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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: G = None
        self.t: I = None
        self.v: A = None
        self.w: I = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: J = None
        self.s: F = None
        self.p: I = None
        self.y: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: G = None
        self.t: I = None
        self.v: A = None
        self.w: I = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: J = None
        self.s: F = None
        self.p: I = None
        self.y: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

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