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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.y: J = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.p: F = None
        self.z: C = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.y: A = None
        self.o: A = None
        self.z: E = None
        self.s: B = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.y: A = None
        self.txt = txt

e = A("e")
j = B("j")
k = C("k")
h = D("h")
i = E("i")
f = F("f")
a = G("a")
g = H("g")
b = I("b")
c = J("c")

e.u = h
e.q = j
e.z = f
e.p = f
e.v = b
e.w = b
e.x = b
e.y = g
e.o = i
e.s = a
j.v = h
j.y = b
j.r = a
k.r = f
k.v = c
h.p = a
h.z = f
h.y = c
h.t = e
h.x = k
i.y = b
i.r = b
i.p = f
i.z = k
i.u = j
f.r = h
f.q = h
f.z = c
f.u = a
f.y = a
f.v = a
f.s = g
f.x = j
a.z = g
a.y = g
a.u = g
a.s = h
a.o = h
a.q = f
a.r = e
a.x = c
g.q = h
b.q = g
b.w = j
b.s = j
b.v = j
b.y = e
b.o = e
b.z = i
b.u = f
c.r = h
c.v = g
c.y = e
assert c.r.x.v.r.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.z: F = None
        self.v: I = None
        self.y: H = None
        self.w: I = None
        self.o: E = None
        self.s: G = None
        self.p: F = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.y: J = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.p: F = None
        self.z: C = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.y: A = None
        self.o: A = None
        self.z: E = None
        self.s: B = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.y: A = None
        self.txt = txt

e = A("e")
j = B("j")
k = C("k")
h = D("h")
i = E("i")
f = F("f")
a = G("a")
g = H("g")
b = I("b")
c = J("c")

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