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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.z: C = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: E = None
        self.v: D = None
        self.z: H = None
        self.o: B = None
        self.s: E = None
        self.y: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: C = None
        self.y: F = None
        self.p: A = None
        self.o: G = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.z: C = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: E = None
        self.v: D = None
        self.z: H = None
        self.o: B = None
        self.s: E = None
        self.y: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: C = None
        self.y: F = None
        self.p: A = None
        self.o: G = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

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

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