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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.v: J = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: I = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: I = None
        self.y: C = None
        self.z: A = None
        self.x: H = None
        self.s: J = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: E = None
        self.o: G = None
        self.q: B = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.p: I = None
        self.x: G = None
        self.s: D = None
        self.t: G = None
        self.y: I = None
        self.o: B = None
        self.w: D = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.v: J = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: I = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: I = None
        self.y: C = None
        self.z: A = None
        self.x: H = None
        self.s: J = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: E = None
        self.o: G = None
        self.q: B = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: I = None
        self.p: I = None
        self.x: G = None
        self.s: D = None
        self.t: G = None
        self.y: I = None
        self.o: B = None
        self.w: D = None
        self.z: I = None
        self.txt = txt

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

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