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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: J = None
        self.r: J = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: H = None
        self.v: J = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: J = None
        self.r: J = None
        self.u: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: H = None
        self.v: J = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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