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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: I = None
        self.p: G = None
        self.r: B = None
        self.v: E = None
        self.o: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: J = None
        self.s: H = None
        self.p: H = None
        self.y: B = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: I = None
        self.p: G = None
        self.r: B = None
        self.v: E = None
        self.o: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: J = None
        self.s: H = None
        self.p: H = None
        self.y: B = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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