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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.q: H = None
        self.x: C = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.p: I = None
        self.s: A = None
        self.y: E = None
        self.x: D = None
        self.txt = txt

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

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

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

g = A("g")
a = B("a")
d = C("d")
l = D("l")
k = E("k")
f = F("f")
j = G("j")
n = H("n")
b = I("b")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.q: H = None
        self.x: C = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.p: I = None
        self.s: A = None
        self.y: E = None
        self.x: D = None
        self.txt = txt

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

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

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

g = A("g")
a = B("a")
d = C("d")
l = D("l")
k = E("k")
f = F("f")
j = G("j")
n = H("n")
b = I("b")

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