class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.r: F = None
        self.u: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.r: F = None
        self.u: C = None
        self.y: E = None
        self.txt = txt

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

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

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