class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: I = None
        self.z: F = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: J = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.w: C = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.p: G = None
        self.t: C = None
        self.q: B = None
        self.x: C = None
        self.y: A = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.z: E = None
        self.u: J = None
        self.x: F = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: H = None
        self.t: F = None
        self.w: E = None
        self.x: F = None
        self.v: E = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: J = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.w: C = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.p: G = None
        self.t: C = None
        self.q: B = None
        self.x: C = None
        self.y: A = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.z: E = None
        self.u: J = None
        self.x: F = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: H = None
        self.t: F = None
        self.w: E = None
        self.x: F = None
        self.v: E = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

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