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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.p: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: C = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.o: D = None
        self.r: I = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.p: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: C = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.o: D = None
        self.r: I = None
        self.u: G = None
        self.txt = txt

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

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