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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: D = None
        self.x: G = None
        self.r: E = None
        self.q: E = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: I = None
        self.r: J = None
        self.y: E = None
        self.v: D = None
        self.w: H = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: D = None
        self.s: A = None
        self.r: J = None
        self.q: I = None
        self.u: C = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: D = None
        self.x: G = None
        self.r: E = None
        self.q: E = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: I = None
        self.r: J = None
        self.y: E = None
        self.v: D = None
        self.w: H = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: D = None
        self.s: A = None
        self.r: J = None
        self.q: I = None
        self.u: C = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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