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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.r: G = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.u: G = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: I = None
        self.r: H = None
        self.o: H = None
        self.u: I = None
        self.z: A = None
        self.x: H = None
        self.q: F = None
        self.p: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: I = None
        self.x: H = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.r: G = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.u: G = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: I = None
        self.r: H = None
        self.o: H = None
        self.u: I = None
        self.z: A = None
        self.x: H = None
        self.q: F = None
        self.p: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: I = None
        self.x: H = None
        self.w: E = None
        self.v: A = None
        self.txt = txt

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

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