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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.u: J = None
        self.z: G = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: J = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.t: F = None
        self.p: D = None
        self.r: J = None
        self.z: E = None
        self.txt = txt

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

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

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

j.z = a
j.r = n
j.w = c
j.x = m
j.s = l
g.w = c
a.t = i
n.w = c
n.o = c
n.u = e
n.z = i
n.t = g
c.x = l
k.o = e
i.s = c
i.w = e
i.o = a
l.y = a
l.s = j
l.t = k
l.p = n
l.r = e
l.z = c
m.u = k
e.p = m
e.s = n
e.u = j
assert n.t.w.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.w: E = None
        self.x: I = None
        self.s: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.u: J = None
        self.z: G = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: J = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.t: F = None
        self.p: D = None
        self.r: J = None
        self.z: E = None
        self.txt = txt

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

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

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

j.z = a
j.r = n
j.w = c
j.x = m
j.s = l
g.w = c
a.t = i
n.w = c
n.o = c
n.u = e
n.z = i
n.t = g
c.x = l
k.o = e
i.s = c
i.w = e
i.o = a
l.y = a
l.s = j
l.t = k
l.p = n
l.r = e
l.z = c
m.u = k
e.p = m
e.s = n
e.u = j
assert n.t.w.x.r.txt == "e"