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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: B = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: H = None
        self.p: C = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.s: J = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: B = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: H = None
        self.p: C = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.s: J = None
        self.y: E = None
        self.txt = txt

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

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

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