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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: E = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: G = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: G = None
        self.q: J = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: E = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: G = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: G = None
        self.q: J = None
        self.t: G = None
        self.txt = txt

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

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

g.u = d
g.p = j
a.z = i
a.u = m
k.t = d
k.v = b
n.p = a
n.q = h
i.w = a
i.v = n
i.z = j
h.q = j
h.r = j
h.x = i
b.y = j
b.x = d
b.u = h
m.p = k
m.t = b
m.z = d
d.u = m
d.v = b
d.t = b
d.q = j
j.r = a
assert i.v.p.z.w.z.z.txt == "j"