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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.y: E = None
        self.w: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: E = None
        self.p: D = None
        self.z: F = None
        self.u: J = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.y: E = None
        self.w: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: E = None
        self.p: D = None
        self.z: F = None
        self.u: J = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

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