class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.y: B = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.t: J = None
        self.r: C = None
        self.w: I = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.q: D = None
        self.r: J = None
        self.u: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: H = None
        self.u: E = None
        self.s: C = None
        self.w: J = None
        self.x: H = None
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.y: E = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.t: J = None
        self.r: C = None
        self.w: I = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.q: D = None
        self.r: J = None
        self.u: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: H = None
        self.u: E = None
        self.s: C = None
        self.w: J = None
        self.x: H = None
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.y: E = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

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