class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: C = None
        self.r: G = None
        self.u: B = None
        self.q: F = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.q: J = None
        self.r: B = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
d = C("d")
j = D("j")
n = E("n")
a = F("a")
k = G("k")
c = H("c")
i = I("i")
m = J("m")

b.x = i
b.o = d
b.r = k
b.u = h
b.q = a
b.s = a
b.z = a
h.u = i
h.q = j
d.r = c
d.x = k
j.o = b
j.x = b
j.y = d
j.t = m
j.q = h
j.s = i
n.u = b
n.p = a
a.q = i
a.s = d
a.u = h
a.x = h
a.r = n
a.z = n
a.w = c
a.t = c
a.p = k
k.z = j
k.v = d
k.q = m
k.r = h
k.p = n
c.y = h
i.w = c
i.x = c
i.v = n
i.q = n
i.p = k
i.s = j
m.t = c
m.y = c
m.q = i
m.z = j
m.u = k
m.o = k
m.p = n
m.r = b
assert d.x.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: C = None
        self.r: G = None
        self.u: B = None
        self.q: F = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.q: J = None
        self.r: B = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
d = C("d")
j = D("j")
n = E("n")
a = F("a")
k = G("k")
c = H("c")
i = I("i")
m = J("m")

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