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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.r: J = None
        self.s: I = None
        self.t: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.p: D = None
        self.y: D = None
        self.t: E = None
        self.w: G = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: I = None
        self.q: C = None
        self.p: D = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.z: A = None
        self.w: H = None
        self.p: G = None
        self.y: F = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: I = None
        self.y: I = None
        self.u: I = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.r: J = None
        self.s: I = None
        self.t: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.p: D = None
        self.y: D = None
        self.t: E = None
        self.w: G = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: I = None
        self.q: C = None
        self.p: D = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.z: A = None
        self.w: H = None
        self.p: G = None
        self.y: F = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: I = None
        self.y: I = None
        self.u: I = None
        self.w: G = None
        self.txt = txt

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

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