class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: I = None
        self.z: J = None
        self.v: E = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.o: C = None
        self.x: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: D = None
        self.q: B = None
        self.o: F = None
        self.u: D = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: I = None
        self.z: J = None
        self.v: E = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.o: C = None
        self.x: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: D = None
        self.q: B = None
        self.o: F = None
        self.u: D = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

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

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