class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: C = None
        self.z: E = None
        self.p: F = None
        self.r: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.s: H = None
        self.r: J = None
        self.y: B = None
        self.w: H = None
        self.v: E = None
        self.q: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.q: I = None
        self.w: I = None
        self.x: F = None
        self.t: H = None
        self.u: J = None
        self.r: J = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.x: I = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.t: D = None
        self.x: B = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: C = None
        self.z: E = None
        self.p: F = None
        self.r: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.s: H = None
        self.r: J = None
        self.y: B = None
        self.w: H = None
        self.v: E = None
        self.q: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.q: I = None
        self.w: I = None
        self.x: F = None
        self.t: H = None
        self.u: J = None
        self.r: J = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.x: I = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.t: D = None
        self.x: B = None
        self.r: H = None
        self.txt = txt

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

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