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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: J = None
        self.v: E = None
        self.o: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.o: B = None
        self.y: G = None
        self.x: E = None
        self.u: J = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: G = None
        self.y: B = None
        self.p: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: J = None
        self.v: E = None
        self.o: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.o: B = None
        self.y: G = None
        self.x: E = None
        self.u: J = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: G = None
        self.y: B = None
        self.p: B = None
        self.o: E = None
        self.txt = txt

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

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

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