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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: G = None
        self.o: A = None
        self.y: F = None
        self.r: A = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: G = None
        self.o: A = None
        self.y: F = None
        self.r: A = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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