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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: E = None
        self.x: I = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.o: C = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: E = None
        self.x: I = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.o: C = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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