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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.u: D = None
        self.t: B = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.q: H = None
        self.o: H = None
        self.u: B = None
        self.txt = txt

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

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

g = A("g")
e = B("e")
k = C("k")
l = D("l")
m = E("m")
i = F("i")
j = G("j")
n = H("n")
f = I("f")

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.u: D = None
        self.t: B = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.q: H = None
        self.o: H = None
        self.u: B = None
        self.txt = txt

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

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

g = A("g")
e = B("e")
k = C("k")
l = D("l")
m = E("m")
i = F("i")
j = G("j")
n = H("n")
f = I("f")

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